204 references to SR
System.Reflection.Metadata (204)
System\Reflection\Internal\Utilities\ExceptionUtilities.cs (4)
12return new InvalidOperationException(SR.Format(SR.UnexpectedValue, value, value.GetType().FullName)); 15return new InvalidOperationException(SR.Format(SR.UnexpectedValueUnknownType, value));
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
94throw new ArgumentException(SR.StreamTooLarge, streamParameterName);
System\Reflection\Metadata\AssemblyNameInfo.cs (1)
207: throw new ArgumentException(SR.InvalidAssemblyName, nameof(assemblyName));
System\Reflection\Metadata\BlobBuilder.cs (2)
538throw new InvalidOperationException(SR.Format(SR.ReturnedBuilderSizeTooSmall, GetType(), nameof(AllocateChunk)));
System\Reflection\Metadata\BlobContentId.cs (4)
51throw new ArgumentException(SR.Format(SR.UnexpectedArrayLength, Size), nameof(id)); 90throw new ArgumentException(SR.Format(SR.HashTooShort, minHashSize), nameof(hashCode));
System\Reflection\Metadata\BlobReader.cs (2)
349throw new BadImageFormatException(SR.ValueTooLarge); 697throw new BadImageFormatException(SR.InvalidConstantValue);
System\Reflection\Metadata\BlobWriterImpl.cs (4)
216throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, type)); 289throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, type));
System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs (1)
419_ => throw new BadImageFormatException(SR.NotTypeDefOrRefHandle),
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
1096throw new ArgumentException(SR.InvalidSignature, nameof(attributes));
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (8)
57throw new InvalidOperationException(SR.Format(SR.DistanceBetweenInstructionAndLabelTooBig, OpCode, ILOffset, distance)); 268Throw.InvalidOperation(SR.SwitchInstructionEncoderTooFewBranches); 276Throw.InvalidOperation(SR.SwitchInstructionEncoderTooManyBranches); 387Throw.InvalidOperation(SR.Format(SR.InvalidExceptionRegionBounds, tryStart, tryEnd)); 392Throw.InvalidOperation(SR.Format(SR.InvalidExceptionRegionBounds, handlerStart, handlerEnd));
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (1)
214Throw.InvalidOperation(SR.MethodHasNoExceptionRegions);
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (2)
23throw new ArgumentException(SR.BuilderMustAligned, nameof(builder)); 186Throw.ArgumentOutOfRange(nameof(instructionEncoder), SR.TooManyExceptionRegions);
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (10)
63throw new ArgumentException(SR.BaseReaderMustBeFullMetadataReader, nameof(baseReader)); 73throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.TableCount), nameof(baseTableRowCounts)); 83throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.HeapCount), nameof(baseTableRowCounts)); 89throw new ArgumentException(SR.ExpectedNonEmptyList, nameof(deltaReaders)); 96throw new ArgumentException(SR.ReadersMustBeDeltaReaders, nameof(deltaReaders)); 226throw new BadImageFormatException(SR.EnCMapNotSorted); 287throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle)); 320throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle));
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (2)
109throw new ArgumentException(SR.Format(SR.ValueMustBeMultiple, BlobUtilities.SizeOfGuid), nameof(guidHeapStartOffset));
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (2)
372Throw.InvalidOperation(SR.ModuleAlreadyAdded); 402Throw.InvalidOperation(SR.AssemblyAlreadyAdded);
System\Reflection\Metadata\Ecma335\MetadataReaderExtensions.cs (2)
428throw new ArgumentOutOfRangeException(nameof(typeHandle), SR.Format(SR.UnexpectedHandleKind, typeHandle.Kind));
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (1)
66Throw.InvalidArgument(SR.MetadataVersionTooLong, nameof(metadataVersion));
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (1)
107throw new NotSupportedException(SR.CantGetOffsetForVirtualHeapHandle);
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (6)
78throw new ArgumentException(SR.Format(SR.ExpectedArrayOfSize, MetadataTokens.TableCount), nameof(typeSystemRowCounts)); 90throw new ArgumentOutOfRangeException(nameof(typeSystemRowCounts), SR.Format(SR.RowCountOutOfRange, i)); 95throw new ArgumentException(SR.Format(SR.RowCountMustBeZero, i), nameof(typeSystemRowCounts));
System\Reflection\Metadata\Ecma335\SignatureDecoder.cs (9)
130throw new BadImageFormatException(SR.Format(SR.UnexpectedSignatureTypeCode, typeCode)); 145throw new BadImageFormatException(SR.SignatureTypeSequenceMustHaveAtLeastOneElement); 316throw new BadImageFormatException(SR.NotTypeDefOrRefHandle); 328throw new BadImageFormatException(SR.NotTypeDefOrRefOrSpecHandle); 335throw new BadImageFormatException(SR.Format(SR.UnexpectedSignatureHeader, expectedKind, header.Kind, header.RawValue)); 344throw new BadImageFormatException(SR.Format(SR.UnexpectedSignatureHeader2, SignatureKind.Property, SignatureKind.Method, header.Kind, header.RawValue));
System\Reflection\Metadata\IL\ILOpCodeExtensions.cs (6)
92throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode)); 164throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode)); 236throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode));
System\Reflection\Metadata\IL\MethodBodyBlock.cs (8)
121throw new BadImageFormatException(SR.Format(SR.InvalidMethodHeader1, headByte)); 128throw new BadImageFormatException(SR.Format(SR.InvalidMethodHeader2, headByte, headByte2)); 149throw new BadImageFormatException(SR.Format(SR.InvalidLocalSignatureToken, unchecked((uint)localSignatureToken))); 162throw new BadImageFormatException(SR.Format(SR.InvalidSehHeader, sehHeader));
System\Reflection\Metadata\Internal\BlobHeap.cs (1)
193throw new BadImageFormatException(SR.InvalidDocumentName);
System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs (2)
89throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, value.GetType()), nameof(value));
System\Reflection\Metadata\MetadataReader.cs (31)
93Throw.InvalidArgument(SR.MetadataStringDecoderEncodingMustBeUtf8, nameof(utf8Decoder)); 136throw new BadImageFormatException(SR.Format(SR.ModuleTableInvalidNumberOfRows, this.ModuleTable.NumberOfRows)); 182throw new BadImageFormatException(SR.MetadataHeaderTooSmall); 188throw new BadImageFormatException(SR.MetadataSignature); 203throw new BadImageFormatException(SR.NotEnoughSpaceForVersionString); 246throw new BadImageFormatException(SR.StreamHeaderTooSmall); 256throw new BadImageFormatException(SR.NotEnoughSpaceForStreamHeaderName); 281throw new BadImageFormatException(SR.NotEnoughSpaceForStringStream); 290throw new BadImageFormatException(SR.NotEnoughSpaceForBlobStream); 299throw new BadImageFormatException(SR.NotEnoughSpaceForGUIDStream); 308throw new BadImageFormatException(SR.NotEnoughSpaceForBlobStream); 317throw new BadImageFormatException(SR.NotEnoughSpaceForMetadataStream); 327throw new BadImageFormatException(SR.NotEnoughSpaceForMetadataStream); 337throw new BadImageFormatException(SR.NotEnoughSpaceForMetadataStream); 347throw new BadImageFormatException(SR.NotEnoughSpaceForMetadataStream); 361throw new BadImageFormatException(SR.InvalidMetadataStreamFormat); 436throw new BadImageFormatException(SR.MetadataTableHeaderTooSmall); 467throw new BadImageFormatException(SR.Format(SR.UnknownTables, presentTables)); 478throw new BadImageFormatException(SR.IllegalTablesInCompressedMetadataStream); 503throw new BadImageFormatException(SR.TableRowCountSpaceTooSmall); 509throw new BadImageFormatException(SR.Format(SR.InvalidRowCount, rowCount)); 539throw new BadImageFormatException(SR.Format(SR.InvalidEntryPointToken, entryPointToken)); 549throw new BadImageFormatException(SR.Format(SR.UnknownTables, externalTableMask)); 781throw new BadImageFormatException(SR.MetadataTablesTooSmall); 1055throw new InvalidOperationException(SR.MetadataImageDoesNotRepresentAnAssembly); 1112throw new InvalidOperationException(SR.StandaloneDebugMetadataImageDoesNotContainModuleTable);
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
77throw new BadImageFormatException(SR.PEImageDoesNotHaveMetadata, assemblyFile);
System\Reflection\Metadata\MetadataReader.WinMD.cs (1)
658throw new BadImageFormatException(SR.WinMDMissingMscorlibRef);
System\Reflection\Metadata\MetadataReaderProvider.cs (1)
172throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(stream));
System\Reflection\Metadata\PEReaderExtensions.cs (2)
34throw new BadImageFormatException(SR.Format(SR.InvalidMethodRva, relativeVirtualAddress));
System\Reflection\Metadata\PortablePdb\ImportDefinitionCollection.cs (2)
123throw new BadImageFormatException(SR.Format(SR.InvalidImportDefinitionKind, kind));
System\Reflection\Metadata\TypeNameParserHelpers.cs (10)
359throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}"); 366throw new InvalidOperationException(SR.Format(SR.InvalidOperation_MaxNodesExceeded, limit)); 377throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 388throw new InvalidOperationException(SR.InvalidOperation_NotNestedType); 399throw new InvalidOperationException(SR.InvalidOperation_NoElement); 410throw new InvalidOperationException(SR.Argument_HasToBeArrayClass); 421throw new InvalidOperationException(SR.InvalidOperation_NestedTypeNamespace); 445throw new InvalidOperationException(SR.Format(SR.Arg_NotSimpleTypeName, fullName));
System\Reflection\Metadata\TypeSystem\TypeDefinition.cs (1)
150throw new BadImageFormatException(SR.InvalidTypeSize);
System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.cs (1)
119Throw.InvalidArgument(SR.ExpectedNonEmptyString, nameof(pdbPath));
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (2)
118_ => throw new ArgumentException(SR.Format(SR.UnknownSectionName, name), nameof(name)),
System\Reflection\PortableExecutable\PEBuilder.cs (3)
79throw new InvalidOperationException(SR.Format(SR.MustNotReturnNull, nameof(CreateSections))); 506throw new InvalidOperationException(SR.SignatureProviderReturnedInvalidSignature);
System\Reflection\PortableExecutable\PEHeader.cs (1)
289throw new BadImageFormatException(SR.UnknownPEMagicValue);
System\Reflection\PortableExecutable\PEHeaders.cs (10)
83throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(peStream)); 96throw new BadImageFormatException(SR.InvalidPESignature); 107throw new BadImageFormatException(SR.UnknownFileFormat); 256throw new BadImageFormatException(SR.InvalidCorHeaderSize); 281throw new BadImageFormatException(SR.UnknownFileFormat); 301throw new BadImageFormatException(SR.InvalidPESignature); 311throw new BadImageFormatException(SR.InvalidNumberOfSections); 347throw new BadImageFormatException(SR.SectionTooSmall); 414throw new BadImageFormatException(SR.MissingDataDirectory); 425throw new BadImageFormatException(SR.InvalidMetadataSectionSpan);
System\Reflection\PortableExecutable\PEReader.cs (12)
165throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(peStream)); 361throw new InvalidOperationException(SR.PEImageDoesNotHaveMetadata); 548throw new BadImageFormatException(SR.InvalidDirectoryRVA); 553throw new BadImageFormatException(SR.InvalidDirectorySize); 572throw new BadImageFormatException(SR.InvalidDebugDirectoryEntryCharacteristics); 608Throw.InvalidArgument(SR.Format(SR.UnexpectedDebugDirectoryType, nameof(DebugDirectoryEntryType.CodeView)), nameof(entry)); 627throw new BadImageFormatException(SR.UnexpectedCodeViewDataSignature); 648Throw.InvalidArgument(SR.Format(SR.UnexpectedDebugDirectoryType, nameof(DebugDirectoryEntryType.PdbChecksum)), nameof(entry)); 666throw new BadImageFormatException(SR.InvalidPdbChecksumDataFormat); 829throw new InvalidOperationException(SR.StreamMustSupportReadAndSeek);
System\Reflection\PortableExecutable\PEReader.EmbeddedPortablePdb.cs (10)
38Throw.InvalidArgument(SR.Format(SR.UnexpectedDebugDirectoryType, nameof(DebugDirectoryEntryType.EmbeddedPortablePdb)), nameof(entry)); 58throw new BadImageFormatException(SR.Format(SR.UnsupportedFormatVersion, PortablePdbVersions.Format(formatVersion))); 64throw new BadImageFormatException(SR.Format(SR.UnsupportedFormatVersion, PortablePdbVersions.Format(embeddedBlobVersion))); 76throw new BadImageFormatException(SR.UnexpectedEmbeddedPortablePdbDataSignature); 87throw new BadImageFormatException(SR.DataTooBig, e); 117throw new BadImageFormatException(SR.SizeMismatch); 126throw new BadImageFormatException(SR.SizeMismatch);
System\Reflection\Throw.cs (35)
29throw new ArgumentException(SR.CantGetOffsetForVirtualHeapHandle, "handle"); 35throw new ArgumentException(SR.Format(SR.UnexpectedHandleKind, kind)); 41throw new ArgumentException(SR.InvalidHandle, parameterName); 47throw new InvalidOperationException(SR.SignatureNotVarArg); 53throw new InvalidOperationException(SR.ControlFlowBuilderNotAvailable); 59throw new InvalidOperationException(SR.BuilderAlreadyLinked); 71throw new InvalidOperationException(SR.Format(SR.LabelNotMarked, id)); 77throw new ArgumentException(SR.LabelDoesntBelongToBuilder, parameterName); 83throw new ArgumentException(SR.NotMetadataHeapHandle, "handle"); 89throw new ArgumentException(SR.NotMetadataTableOrUserStringHandle, "handle"); 95throw new ArgumentException(SR.InvalidToken, "token"); 107throw new ArgumentException(SR.ExpectedNonEmptyString, parameterName); 113throw new ArgumentException(SR.ExpectedNonEmptyArray, parameterName); 131throw new ArgumentOutOfRangeException(parameterName, SR.BlobTooLarge); 155throw new BadImageFormatException(SR.OutOfBoundsRead); 161throw new InvalidOperationException(SR.OutOfBoundsWrite); 167throw new BadImageFormatException(SR.InvalidCodedIndex); 173throw new BadImageFormatException(SR.InvalidHandle); 179throw new BadImageFormatException(SR.InvalidCompressedInteger); 185throw new BadImageFormatException(SR.InvalidSerializedString); 191throw new BadImageFormatException(SR.ImageTooSmall); 197throw new BadImageFormatException(SR.ImageTooSmallOrContainsInvalidOffsetOrCount); 203throw new BadImageFormatException(SR.RowIdOrHeapOffsetTooLarge); 209throw new BadImageFormatException(SR.Format(SR.MetadataTableNotSorted, tableIndex)); 215throw new InvalidOperationException(SR.Format(SR.MetadataTableNotSorted, tableIndex)); 221throw new InvalidOperationException(SR.PEImageNotAvailable); 227throw new BadImageFormatException(SR.TooManySubnamespaces); 233throw new BadImageFormatException(SR.ValueTooLarge); 239throw new BadImageFormatException(SR.SequencePointValueOutOfRange); 245throw new ImageFormatLimitationException(SR.Format(SR.HeapSizeLimitExceeded, heap));