-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make System.Reflection.Emit public types abstract #78544
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsWe plan to abstract out Reflection.Emit APIs for adding This PR is based on @jkotas prototype, but only covers the effort of abstracting all public APIs in System.Reflection.Emit. Creating draft PR as the API proposal is not yet approved Fixes #78542
|
Tagging subscribers to this area: @dotnet/area-system-reflection-emit Issue DetailsWe plan to abstract out Reflection.Emit APIs for adding This PR is based on @jkotas prototype, but only covers the effort of abstracting all public APIs in System.Reflection.Emit. Creating draft PR as the API proposal is not yet approved Fixes #78542
|
The mono changes look ok. |
bcd07c4
to
a348398
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the filename changes, this LGTM.
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/ConstructorBuilder.cs
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.cs
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/EventBuilder.cs
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs
Outdated
Show resolved
Hide resolved
Update: Updated API proposal for using protected abstract APIs approved. For the new GetTypeMetadataToken(Type type)
GetFieldMetadataToken(FieldInfo field)
GetMethodMetadataToken(MethodInfo method)
GetMethodMetadataToken(ConstructorInfo constructor)
GetSignatureMetadataToken(SignatureHelper signature)
GetStringMetadataToken(string stringConstant) All suggested changes are applied to the PR |
This can be removed in the main description:
|
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeAssemblyBuilder.cs
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeAssemblyBuilder.cs
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeAssemblyBuilder.cs
Show resolved
Hide resolved
8bad3a7
to
a16ce6e
Compare
We plan to abstract out Reflection.Emit APIs for adding
AssemblyBuilder.Save()
in .NET Core. So that we can have two implementations, one that having old code to support all downlevel runtime, and a new implementation that replaces the current Reflection.Emit implementation with AssemblyBuilder.Save() support.This PR is based on @jkotas prototype, but only covers the effort of abstracting all public APIs in System.Reflection.Emit.
Fixes #78542