diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEnumBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEnumBuilder.cs index 5ac47e64da97f..de3a31ada9e47 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEnumBuilder.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEnumBuilder.cs @@ -38,7 +38,7 @@ protected override FieldBuilder DefineLiteralCore(string literalName, object? li return fieldBuilder; } - [return: DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes.All)] + [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] protected override TypeInfo CreateTypeInfoCore() { return m_typeBuilder.CreateTypeInfo(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs index e8eda8e1f85a4..0e2a07f03ab2d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/ModuleBuilder.cs @@ -136,7 +136,7 @@ public void SetCustomAttribute(CustomAttributeBuilder customBuilder) public abstract int GetTypeMetadataToken(Type type); public abstract int GetFieldMetadataToken(FieldInfo field); public abstract int GetMethodMetadataToken(MethodInfo method); - public abstract int GetMethodMetadataToken(ConstructorInfo contsuctor); + public abstract int GetMethodMetadataToken(ConstructorInfo constructor); public abstract int GetSignatureMetadataToken(SignatureHelper signature); public abstract int GetStringMetadataToken(string stringConstant); } diff --git a/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.cs b/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.cs index b7ba1bb78bc6b..14b8c7b36d9c1 100644 --- a/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.cs +++ b/src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.cs @@ -123,6 +123,7 @@ protected EnumBuilder() { } public System.Type CreateType() { throw null; } [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] public System.Reflection.TypeInfo CreateTypeInfo() { throw null; } + [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] protected abstract System.Reflection.TypeInfo CreateTypeInfoCore(); public System.Reflection.Emit.FieldBuilder DefineLiteral(string literalName, object? literalValue) { throw null; } protected abstract System.Reflection.Emit.FieldBuilder DefineLiteralCore(string literalName, object? literalValue); @@ -416,6 +417,7 @@ public void CreateGlobalFunctions() { } public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type? returnType, System.Type[]? parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("P/Invoke marshalling may dynamically access members that could be trimmed.")] public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type? returnType, System.Type[]? parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw null; } + [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("P/Invoke marshalling may dynamically access members that could be trimmed.")] protected abstract System.Reflection.Emit.MethodBuilder DefinePInvokeMethodCore(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type? returnType, System.Type[]? parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet); public System.Reflection.Emit.TypeBuilder DefineType(string name) { throw null; } public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr) { throw null; } @@ -542,6 +544,7 @@ protected TypeBuilder() { } protected abstract System.Reflection.Emit.PackingSize PackingSizeCore { get; } public override System.Type? ReflectedType { get { throw null; } } public int Size { get { throw null; } } + protected abstract int SizeCore { get; } public override System.RuntimeTypeHandle TypeHandle { get { throw null; } } public override System.Type UnderlyingSystemType { get { throw null; } } public void AddInterfaceImplementation([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] System.Type interfaceType) { } @@ -550,6 +553,7 @@ public void AddInterfaceImplementation([System.Diagnostics.CodeAnalysis.Dynamica public System.Type CreateType() { throw null; } [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] public System.Reflection.TypeInfo CreateTypeInfo() { throw null; } + [return: System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All)] protected abstract System.Reflection.TypeInfo CreateTypeInfoCore(); public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[]? parameterTypes) { throw null; } public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[]? parameterTypes, System.Type[][]? requiredCustomModifiers, System.Type[][]? optionalCustomModifiers) { throw null; }