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