167 references to SR
System.Reflection.Emit (167)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (3)
56
public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
91
throw new InvalidOperationException(
SR
.Format(
SR
.Arg_NotGenericMethodDefinition, this));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (29)
76
throw new ArgumentException(
SR
.Argument_BadSigFormat);
137
throw new ArgumentException(
SR
.Argument_BadSigFormat);
167
throw new ArgumentException(
SR
.Argument_BadSigFormat);
185
throw new ArgumentException(
SR
.Argument_BadSigFormat);
301
throw new ArgumentException(
SR
.Argument_HasToBeArrayClass);
306
public override Guid GUID => throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
315
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
341
public override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
374
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
380
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
387
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
393
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
399
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
405
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
412
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
418
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
424
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
430
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
437
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
443
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
449
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
455
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
461
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
467
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
479
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
485
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
542
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
547
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
552
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
System\Reflection\Emit\ArrayMethod.cs (8)
60
public override ParameterInfo[] GetParameters() => throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
62
public override MethodImplAttributes GetMethodImplementationFlags() => throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
68
public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
74
public override ICustomAttributeProvider ReturnTypeCustomAttributes => throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
77
=> throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
83
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
85
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
87
public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_SymbolMethod);
System\Reflection\Emit\ConstructorBuilderImpl.cs (7)
35
throw new InvalidOperationException(
SR
.InvalidOperation_DefaultConstructorILGen);
74
public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
75
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
76
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
79
=> throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
81
throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
82
public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
System\Reflection\Emit\CustomAttributeWrapper.cs (9)
44
throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidCustomAttributeLength, ctor.DeclaringType, binaryAttribute.Length), nameof(binaryAttribute));
48
throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidProlog, ctor.DeclaringType), nameof(binaryAttribute));
88
throw new ArgumentException(
SR
.Format(
SR
.Argument_UnknownNamedType, ctor.DeclaringType, namedType), nameof(binaryAttribute));
154
throw new NotImplementedException(
SR
.Format(
SR
.NotImplemented_TypeForValue, t));
174
_ => throw new ArgumentException(
SR
.Argument_InvalidTypeCodeForTypeArgument, "binaryAttribute"),
System\Reflection\Emit\EnumBuilderImpl.cs (1)
17
throw new ArgumentException(
SR
.Argument_ShouldOnlySetVisibilityFlags, nameof(name));
System\Reflection\Emit\FieldBuilderImpl.cs (6)
104
public override object? GetValue(object? obj) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
107
=> throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
108
public override RuntimeFieldHandle FieldHandle => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
121
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
123
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
125
public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
System\Reflection\Emit\ILGeneratorImpl.cs (17)
90
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
99
throw new ArgumentException(
SR
.Argument_ShouldNotSpecifyExceptionType);
137
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
180
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
208
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
427
throw new ArgumentException(
SR
.Argument_NotMethodCallOpcode, nameof(opcode));
518
throw new ArgumentException(
SR
.Argument_InvalidLabel);
528
throw new ArgumentException(
SR
.Argument_MustBeSwitchOpCode, nameof(opcode));
548
throw new ArgumentException(
SR
.Argument_UnmatchedMethodForLocal, nameof(local));
627
throw new ArgumentException(
SR
.Argument_NotMethodCallOpcode, nameof(opcode));
691
throw new InvalidOperationException(
SR
.InvalidOperation_NotAVarArgCallingConvention);
745
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
754
throw new InvalidOperationException(
SR
.Argument_BadExceptionCodeGen);
777
throw new InvalidOperationException(
SR
.InvalidOperation_UnmatchingSymScope);
790
throw new ArgumentException(
SR
.Argument_RedefinedLabel);
823
throw new ArgumentException(
SR
.Argument_InvalidLabel);
843
throw new ArgumentException(
SR
.InvalidOperation_InvalidDocument, nameof(document));
System\Reflection\Emit\LocalBuilderImpl.cs (1)
36
throw new InvalidOperationException(
SR
.InvalidOperation_TypeHasBeenCreated);
System\Reflection\Emit\MethodBuilderImpl.cs (10)
54
throw new ArgumentException(
SR
.Argument_NoStaticVirtual);
117
throw new InvalidOperationException(
SR
.InvalidOperation_GenericParametersAlreadySet);
136
throw new ArgumentOutOfRangeException(
SR
.ArgumentOutOfRange_ParamSequence);
158
throw new InvalidOperationException(
SR
.InvalidOperation_ShouldNotHaveMethodBody);
163
throw new InvalidOperationException(
SR
.InvalidOperation_ShouldNotHaveMethodBody);
248
public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
270
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
272
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
311
=> throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
313
public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
System\Reflection\Emit\ModuleBuilderImpl.cs (9)
1076
throw new InvalidOperationException(
SR
.InvalidOperation_TokenNotPopulated);
1188
throw new InvalidOperationException(
SR
.InvalidOperation_NotAVarArgCallingConvention);
1227
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1247
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1252
throw new ArgumentException(
SR
.Argument_GlobalMembersMustBeStatic);
1266
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1281
throw new ArgumentException(
SR
.Argument_GlobalMembersMustBeStatic);
1302
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1315
throw new ArgumentException(
SR
.Argument_HasToBeArrayClass);
System\Reflection\Emit\PersistedAssemblyBuilder.cs (4)
142
throw new InvalidOperationException(
SR
.InvalidOperation_AModuleRequired);
147
throw new InvalidOperationException(
SR
.InvalidOperation_CannotPopulateMultipleTimes);
177
throw new InvalidOperationException(
SR
.InvalidOperation_NoMultiModuleAssembly);
202
public override Module ManifestModule => _module ?? throw new InvalidOperationException(
SR
.InvalidOperation_AModuleRequired);
System\Reflection\Emit\PropertyBuilderImpl.cs (9)
141
public override object GetValue(object? obj, object?[]? index) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
143
throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
144
public override void SetValue(object? obj, object? value, object?[]? index) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
146
throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
147
public override MethodInfo[] GetAccessors(bool nonPublic) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
148
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
149
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
150
public override ParameterInfo[] GetIndexParameters() => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
151
public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
System\Reflection\Emit\PseudoCustomAttributesData.cs (16)
34
throw new ArgumentException(
SR
.Argument_DllNameCannotBeEmpty);
100
throw new ArgumentException(
SR
.Argument_DllNameCannotBeEmpty);
323
throw new NotSupportedException(
SR
.Format(
SR
.NotSupported_UnmanagedTypeOnlyForFields, nameof(UnmanagedType.ByValArray)));
333
throw new NotSupportedException(
SR
.Format(
SR
.NotSupported_UnmanagedTypeOnlyForFields, nameof(UnmanagedType.ByValArray)));
346
throw new ArgumentException(
SR
.Argument_InvalidArgumentForAttribute, nameof(con));
372
throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidParameterForUnmanagedType, paramNames[i], "ByValTStr"), "binaryAttribute");
380
throw new ArgumentException(
SR
.Argument_SizeConstMustBeSpecified, "binaryAttribute");
406
throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidParameterForUnmanagedType, paramNames[i], "SafeArray"), "binaryAttribute");
422
throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidParameterForUnmanagedType, elementType, "SafeArray"), "binaryAttribute");
459
throw new ArgumentException(
SR
.Format(
SR
.Argument_InvalidParameterForUnmanagedType,
System\Reflection\Emit\TypeBuilderImpl.cs (38)
138
throw new InvalidOperationException(
SR
.InvalidOperation_BadTypeAttributesNotAbstract);
145
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_BadMethodBody, method.Name));
155
throw new InvalidOperationException(
SR
.InvalidOperation_TypeHasBeenCreated);
164
throw new InvalidOperationException(
SR
.InvalidOperation_ConstructorNotAllowedOnInterface);
190
throw new InvalidOperationException(
SR
.InvalidOperation_ConstructorNotAllowedOnInterface);
216
throw new NotSupportedException(
SR
.NotSupported_NoParentDefaultConstructor);
281
throw new ArgumentException(
SR
.Argument_BadSizeForData, nameof(data.Length));
308
throw new ArgumentException(
SR
.ArgumentException_BadMethodImplBody);
317
throw new ArgumentException(
SR
.Format(
SR
.Argument_MethodOverridden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration));
358
new ArgumentException(
SR
.Format(
SR
.Argument_InvalidMethodOverride, FullName, methodName), "methodInfoBody");
373
throw new ArgumentException(
SR
.Argument_BadPInvokeMethod);
378
throw new ArgumentException(
SR
.Argument_BadPInvokeOnInterface);
390
throw new ArgumentException(
SR
.Argument_MethodRedefined);
420
throw new ArgumentException(
SR
.Argument_BadSizeForData, nameof(size));
541
throw new ArgumentException(
SR
.Format(
SR
.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute));
556
throw new ArgumentException(
SR
.Argument_CannotSetParentToInterface);
571
throw new InvalidOperationException(
SR
.InvalidOperation_BadInterfaceNotAbstract);
601
public override Type GetElementType() => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
615
throw new InvalidOperationException(
SR
.InvalidOperation_NoUnderlyingTypeOnEnum);
622
throw new ArgumentException(
SR
.Argument_MustBeEnum);
651
throw new NotSupportedException(
SR
.NotSupported_TypeNotYetCreated);
825
throw new AmbiguousMatchException(
SR
.Format(
SR
.AmbiguousMatch_MemberInfo, method.DeclaringType, method.Name));
863
throw new AmbiguousMatchException(
SR
.Format(
SR
.AmbiguousMatch_MemberInfo, fieldInfo.DeclaringType, fieldInfo.Name));
951
throw new AmbiguousMatchException(
SR
.Format(
SR
.AmbiguousMatch_MemberInfo, interfaceType.DeclaringType, interfaceType.Name));
1067
throw new AmbiguousMatchException(
SR
.Format(
SR
.AmbiguousMatch_MemberInfo, firstCandidate.DeclaringType, firstCandidate.Name));
1154
throw new AmbiguousMatchException(
SR
.Format(
SR
.AmbiguousMatch_MemberInfo, type.DeclaringType, type.Name));
1310
throw new ArgumentException(
SR
.Argument_MustBeInterface, nameof(interfaceType));
1315
throw new ArgumentException(
SR
.Argument_InterfaceNotFound, nameof(interfaceType));
1320
throw new InvalidOperationException(
SR
.Argument_GenericParameter);