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);
312
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
338
public override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
371
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
377
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
384
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
390
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
396
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
402
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
409
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
415
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
421
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
427
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
434
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
440
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
446
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
452
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
458
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
464
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
476
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
482
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
539
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
544
throw new NotSupportedException(
SR
.NotSupported_NonReflectedType);
549
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 (11)
55
throw new ArgumentException(
SR
.Argument_ConstantNull);
83
throw new ArgumentException(
SR
.Argument_ConstantDoesntMatch);
92
throw new ArgumentException(
SR
.Argument_ConstantDoesntMatch);
101
throw new ArgumentException(
SR
.Argument_ConstantDoesntMatch);
109
throw new ArgumentException(
SR
.Argument_ConstantDoesntMatch);
172
public override object? GetValue(object? obj) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
175
=> throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
176
public override RuntimeFieldHandle FieldHandle => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
187
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
189
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
191
public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
System\Reflection\Emit\ILGeneratorImpl.cs (17)
63
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
72
throw new ArgumentException(
SR
.Argument_ShouldNotSpecifyExceptionType);
110
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
153
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
181
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
400
throw new ArgumentException(
SR
.Argument_NotMethodCallOpcode, nameof(opcode));
491
throw new ArgumentException(
SR
.Argument_InvalidLabel);
501
throw new ArgumentException(
SR
.Argument_MustBeSwitchOpCode, nameof(opcode));
521
throw new ArgumentException(
SR
.Argument_UnmatchedMethodForLocal, nameof(local));
600
throw new ArgumentException(
SR
.Argument_NotMethodCallOpcode, nameof(opcode));
664
throw new InvalidOperationException(
SR
.InvalidOperation_NotAVarArgCallingConvention);
716
throw new NotSupportedException(
SR
.Argument_NotInExceptionBlock);
725
throw new InvalidOperationException(
SR
.Argument_BadExceptionCodeGen);
748
throw new InvalidOperationException(
SR
.InvalidOperation_UnmatchingSymScope);
761
throw new ArgumentException(
SR
.Argument_RedefinedLabel);
794
throw new ArgumentException(
SR
.Argument_InvalidLabel);
814
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)
55
throw new ArgumentException(
SR
.Argument_NoStaticVirtual);
118
throw new InvalidOperationException(
SR
.InvalidOperation_GenericParametersAlreadySet);
137
throw new ArgumentOutOfRangeException(
SR
.ArgumentOutOfRange_ParamSequence);
159
throw new InvalidOperationException(
SR
.InvalidOperation_ShouldNotHaveMethodBody);
164
throw new InvalidOperationException(
SR
.InvalidOperation_ShouldNotHaveMethodBody);
253
public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
275
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
277
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
316
=> throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
318
public override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
System\Reflection\Emit\ModuleBuilderImpl.cs (9)
1082
throw new InvalidOperationException(
SR
.InvalidOperation_TokenNotPopulated);
1193
throw new InvalidOperationException(
SR
.InvalidOperation_NotAVarArgCallingConvention);
1232
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1252
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1257
throw new ArgumentException(
SR
.Argument_GlobalMembersMustBeStatic);
1271
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1286
throw new ArgumentException(
SR
.Argument_GlobalMembersMustBeStatic);
1307
throw new InvalidOperationException(
SR
.InvalidOperation_GlobalsHaveBeenCreated);
1320
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)
142
public override object GetValue(object? obj, object?[]? index) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
144
throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
145
public override void SetValue(object? obj, object? value, object?[]? index) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
147
throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
148
public override MethodInfo[] GetAccessors(bool nonPublic) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
149
public override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
150
public override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
151
public override ParameterInfo[] GetIndexParameters() => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
152
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 (33)
147
throw new InvalidOperationException(
SR
.InvalidOperation_BadTypeAttributesNotAbstract);
153
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_BadMethodBody, method.Name));
158
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_BadEmptyMethodBody, method.Name));
167
throw new InvalidOperationException(
SR
.InvalidOperation_TypeHasBeenCreated);
176
throw new InvalidOperationException(
SR
.InvalidOperation_ConstructorNotAllowedOnInterface);
202
throw new InvalidOperationException(
SR
.InvalidOperation_ConstructorNotAllowedOnInterface);
228
throw new NotSupportedException(
SR
.NotSupported_NoParentDefaultConstructor);
293
throw new ArgumentException(
SR
.Argument_BadSizeForData, nameof(data.Length));
321
throw new ArgumentException(
SR
.ArgumentException_BadMethodImplBody);
330
throw new ArgumentException(
SR
.Format(
SR
.Argument_MethodOverriden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration));
371
new ArgumentException(
SR
.Format(
SR
.Argument_InvalidMethodOverride, FullName, methodName), "methodInfoBody");
386
throw new ArgumentException(
SR
.Argument_BadPInvokeMethod);
391
throw new ArgumentException(
SR
.Argument_BadPInvokeOnInterface);
403
throw new ArgumentException(
SR
.Argument_MethodRedefined);
433
throw new ArgumentException(
SR
.Argument_BadSizeForData, nameof(size));
552
throw new ArgumentException(
SR
.Format(
SR
.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute));
567
throw new ArgumentException(
SR
.Argument_CannotSetParentToInterface);
582
throw new InvalidOperationException(
SR
.InvalidOperation_BadInterfaceNotAbstract);
612
public override Type GetElementType() => throw new NotSupportedException(
SR
.NotSupported_DynamicModule);
626
throw new InvalidOperationException(
SR
.InvalidOperation_NoUnderlyingTypeOnEnum);
660
throw new NotSupportedException(
SR
.NotSupported_TypeNotYetCreated);
814
throw new AmbiguousMatchException(
SR
.Format(
SR
.AmbiguousMatch_MemberInfo, method.DeclaringType, method.Name));
852
throw new AmbiguousMatchException(
SR
.Format(
SR
.AmbiguousMatch_MemberInfo, fieldInfo.DeclaringType, fieldInfo.Name));
980
throw new ArgumentException(
SR
.Argument_MustBeInterface, nameof(interfaceType));
985
throw new ArgumentException(
SR
.Argument_InterfaceNotFound, nameof(interfaceType));
990
throw new InvalidOperationException(
SR
.Argument_GenericParameter);