Skip to content
This repository was archived by the owner on Sep 13, 2022. It is now read-only.
This repository was archived by the owner on Sep 13, 2022. It is now read-only.

Expose a capability API for Reflection Emit #832

@terrajobst

Description

@terrajobst

Assuming #829 goes in, we should consider adding a a capability API. This allows implementations that cannot support runtime code generation to expose up-front that they will fail at runtime with PlatformNotSupportedException. This allows consumers to write code like this:

if (IsRefEmitAvailable())
{
    EmitAndRun();    
}
else
{
    Interpret();
}

Strictly speaking, this is violating our inclusion principles but it seems the opportunity loss seems high for what amounts to be a simple API.

Metadata

Metadata

Assignees

Labels

netstandard-apiThis tracks requests for standardizing APIs.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions