116 references to SR
System.Resources.Extensions (116)
BinaryReaderExtensions.cs (1)
21
throw new FormatException(
SR
.Format_Bad7BitInt32);
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (12)
69
throw new ArgumentException(
SR
.Argument_StreamNotWritable);
86
throw new InvalidOperationException(
SR
.InvalidOperation_ResourceWriterSaved);
103
throw new InvalidOperationException(
SR
.InvalidOperation_ResourceWriterSaved);
129
throw new InvalidOperationException(
SR
.InvalidOperation_ResourceWriterSaved);
149
throw new ArgumentException(
SR
.NotSupported_UnseekableStream);
166
throw new InvalidOperationException(
SR
.InvalidOperation_ResourceWriterSaved);
177
throw new InvalidOperationException(
SR
.InvalidOperation_ResourceWriterSaved);
246
throw new InvalidOperationException(
SR
.InvalidOperation_ResourceWriterSaved);
484
throw new PlatformNotSupportedException(
SR
.NotSupported_BinarySerializedResources);
588
throw new ArgumentException(
SR
.ArgumentOutOfRange_StreamLength);
598
throw new ArgumentException(
SR
.ArgumentOutOfRange_StreamLength);
618
throw new PlatformNotSupportedException(
SR
.NotSupported_BinarySerializedResources);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (67)
125
throw new ArgumentException(
SR
.Argument_StreamNotReadable);
184
throw new BadImageFormatException(
SR
.BadImageFormat_NegativeStringLength);
222
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesNameInvalidOffset, r));
235
throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
318
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
339
throw new BadImageFormatException(
SR
.BadImageFormat_NegativeStringLength);
348
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesNameTooLong);
364
throw new BadImageFormatException(
SR
.BadImageFormat_ResourceNameCorrupted);
387
throw new BadImageFormatException(
SR
.BadImageFormat_NegativeStringLength);
393
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesIndexTooLong, index));
416
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
430
throw new EndOfStreamException(
SR
.Format(
SR
.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
436
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
457
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
483
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName));
496
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_ResourceNotString_Type, typeString));
545
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, eof);
549
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, e);
627
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, eof);
631
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, e);
704
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
711
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
718
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
732
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
744
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
758
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch);
786
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted, eof);
790
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted, e);
804
throw new ArgumentException(
SR
.Resources_StreamNotValid);
813
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
828
throw new NotSupportedException(
SR
.Format(
SR
.NotSupported_WrongResourceReader_Type, readerType));
842
throw new ArgumentException(
SR
.Format(
SR
.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
848
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
856
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
898
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
919
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
930
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
946
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
955
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
966
throw new NotSupportedException(
SR
.ResourceManager_ReflectionNotAllowed);
971
throw new BadImageFormatException(
SR
.BadImageFormat_InvalidType);
1085
if (_currentName == ENUM_DONE) throw new InvalidOperationException(
SR
.InvalidOperation_EnumEnded);
1086
if (!_currentIsValid) throw new InvalidOperationException(
SR
.InvalidOperation_EnumNotStarted);
1087
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
1102
if (_currentName == ENUM_DONE) throw new InvalidOperationException(
SR
.InvalidOperation_EnumEnded);
1103
if (!_currentIsValid) throw new InvalidOperationException(
SR
.InvalidOperation_EnumNotStarted);
1104
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
1139
if (_currentName == ENUM_DONE) throw new InvalidOperationException(
SR
.InvalidOperation_EnumEnded);
1140
if (!_currentIsValid) throw new InvalidOperationException(
SR
.InvalidOperation_EnumNotStarted);
1141
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
1153
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (4)
198
throw new ArgumentException(
SR
.Format(
SR
.NotSupported_WrongResourceReader_Type, reader.GetType()), nameof(reader));
237
ResourceReader reader = _defaultReader ?? throw new ObjectDisposedException(null,
SR
.ObjectDisposed_ResourceSet);
270
throw new ObjectDisposedException(null,
SR
.ObjectDisposed_ResourceSet);
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.TypeResolver.cs (2)
83
_types[typeName.AssemblyQualifiedName] = type ?? throw new SerializationException(
SR
.Format(
SR
.Serialization_MissingType, typeName.AssemblyQualifiedName));
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (4)
41
throw new SerializationException(
SR
.Format(
SR
.Serialization_TypeNotSerializable, type));
95
throw new SerializationException(
SR
.Format(
SR
.Serialization_IObjectReferenceOnlyPrimivite, type));
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordFieldInfoDeserializer.cs (2)
65
throw new SerializationException(
SR
.Format(
SR
.Serialization_MissingField, field.Name, field.DeclaringType!.Name));
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (2)
170
throw new SerializationException(
SR
.Serialization_Incomplete);
246
throw new SerializationException(
SR
.Serialization_Cycle);
System\Resources\Extensions\BinaryFormat\Deserializer\PendingSerializationInfo.cs (3)
55
throw new SerializationException(
SR
.Serialization_Surrogates);
80
throw new SerializationException(
SR
.Format(
SR
.Serialization_MissingCtor, type.FullName));
System\Resources\Extensions\DeserializingResourceReader.cs (15)
136
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, length));
155
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, length));
165
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, length));
174
throw new TypeLoadException(
SR
.Format(
SR
.TypeLoadException_CannotLoadConverter, type));
188
throw new TypeLoadException(
SR
.Format(
SR
.TypeLoadException_CannotLoadConverter, type));
200
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, length));
225
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch);
231
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResType_SerBlobMismatch, type.FullName, value.GetType().FullName));
System\Resources\Extensions\PreserializedResourceWriter.cs (4)
95
throw new TypeLoadException(
SR
.Format(
SR
.TypeLoadException_CannotLoadConverter, primitiveType));
172
throw new ArgumentException(
SR
.NotSupported_UnseekableStream);
228
throw new ArgumentException(
SR
.ArgumentOutOfRange_StreamLength);