@@ -161,22 +161,22 @@ public override Type? BaseType
161161 }
162162 }
163163 [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicConstructors | DynamicallyAccessedMemberTypes . NonPublicConstructors ) ]
164- protected override ConstructorInfo GetConstructorImpl ( BindingFlags bindingAttr , Binder ? binder , CallingConventions callConvention , Type [ ] types , ParameterModifier [ ] ? modifiers ) { throw new NotSupportedException ( ) ; }
164+ protected override ConstructorInfo GetConstructorImpl ( BindingFlags bindingAttr , Binder ? binder , CallingConventions callConvention , Type [ ] types , ParameterModifier [ ] ? modifiers ) { throw new NotSupportedException ( SR . Format ( SR . NotSupported_TypeBuilderInstantiation_ResolvingMembers , nameof ( TypeBuilder . GetConstructor ) ) ) ; }
165165
166166 [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicConstructors | DynamicallyAccessedMemberTypes . NonPublicConstructors ) ]
167- public override ConstructorInfo [ ] GetConstructors ( BindingFlags bindingAttr ) { throw new NotSupportedException ( ) ; }
167+ public override ConstructorInfo [ ] GetConstructors ( BindingFlags bindingAttr ) { throw new NotSupportedException ( SR . Format ( SR . NotSupported_TypeBuilderInstantiation_ResolvingMembers , nameof ( TypeBuilder . GetConstructor ) ) ) ; }
168168
169169 [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicMethods | DynamicallyAccessedMemberTypes . NonPublicMethods ) ]
170- protected override MethodInfo GetMethodImpl ( string name , BindingFlags bindingAttr , Binder ? binder , CallingConventions callConvention , Type [ ] ? types , ParameterModifier [ ] ? modifiers ) { throw new NotSupportedException ( ) ; }
170+ protected override MethodInfo GetMethodImpl ( string name , BindingFlags bindingAttr , Binder ? binder , CallingConventions callConvention , Type [ ] ? types , ParameterModifier [ ] ? modifiers ) { throw new NotSupportedException ( SR . Format ( SR . NotSupported_TypeBuilderInstantiation_ResolvingMembers , nameof ( TypeBuilder . GetMethod ) ) ) ; }
171171
172172 [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicMethods | DynamicallyAccessedMemberTypes . NonPublicMethods ) ]
173- public override MethodInfo [ ] GetMethods ( BindingFlags bindingAttr ) { throw new NotSupportedException ( ) ; }
173+ public override MethodInfo [ ] GetMethods ( BindingFlags bindingAttr ) { throw new NotSupportedException ( SR . Format ( SR . NotSupported_TypeBuilderInstantiation_ResolvingMembers , nameof ( TypeBuilder . GetMethod ) ) ) ; }
174174
175175 [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicFields | DynamicallyAccessedMemberTypes . NonPublicFields ) ]
176- public override FieldInfo GetField ( string name , BindingFlags bindingAttr ) { throw new NotSupportedException ( ) ; }
176+ public override FieldInfo GetField ( string name , BindingFlags bindingAttr ) { throw new NotSupportedException ( SR . Format ( SR . NotSupported_TypeBuilderInstantiation_ResolvingMembers , nameof ( TypeBuilder . GetField ) ) ) ; }
177177
178178 [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . PublicFields | DynamicallyAccessedMemberTypes . NonPublicFields ) ]
179- public override FieldInfo [ ] GetFields ( BindingFlags bindingAttr ) { throw new NotSupportedException ( ) ; }
179+ public override FieldInfo [ ] GetFields ( BindingFlags bindingAttr ) { throw new NotSupportedException ( SR . Format ( SR . NotSupported_TypeBuilderInstantiation_ResolvingMembers , nameof ( TypeBuilder . GetField ) ) ) ; }
180180
181181 [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . Interfaces ) ]
182182 [ return : DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . Interfaces ) ]
0 commit comments