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