116 references to SR
System.Resources.Extensions (116)
BinaryReaderExtensions.cs (1)
21
throw new FormatException(
SR
.Format_Bad7BitInt32);
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\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (67)
129
throw new ArgumentException(
SR
.Argument_StreamNotReadable);
188
throw new BadImageFormatException(
SR
.BadImageFormat_NegativeStringLength);
226
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesNameInvalidOffset, r));
239
throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
322
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
343
throw new BadImageFormatException(
SR
.BadImageFormat_NegativeStringLength);
352
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesNameTooLong);
368
throw new BadImageFormatException(
SR
.BadImageFormat_ResourceNameCorrupted);
391
throw new BadImageFormatException(
SR
.BadImageFormat_NegativeStringLength);
397
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesIndexTooLong, index));
420
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
434
throw new EndOfStreamException(
SR
.Format(
SR
.BadImageFormat_ResourceNameCorrupted_NameIndex, index));
440
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataOffset));
461
throw new FormatException(
SR
.Format(
SR
.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
487
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName));
500
throw new InvalidOperationException(
SR
.Format(
SR
.InvalidOperation_ResourceNotString_Type, typeString));
549
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, eof);
553
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, e);
631
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, eof);
635
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch, e);
708
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
715
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
722
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
736
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
748
throw new BadImageFormatException(
SR
.Format(
SR
.BadImageFormat_ResourceDataLengthInvalid, len));
762
throw new BadImageFormatException(
SR
.BadImageFormat_TypeMismatch);
790
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted, eof);
794
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted, e);
808
throw new ArgumentException(
SR
.Resources_StreamNotValid);
817
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
832
throw new NotSupportedException(
SR
.Format(
SR
.NotSupported_WrongResourceReader_Type, readerType));
846
throw new ArgumentException(
SR
.Format(
SR
.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
852
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
860
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
902
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
923
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
934
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
950
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
959
throw new BadImageFormatException(
SR
.BadImageFormat_ResourcesHeaderCorrupted);
970
throw new NotSupportedException(
SR
.ResourceManager_ReflectionNotAllowed);
975
throw new BadImageFormatException(
SR
.BadImageFormat_InvalidType);
1089
if (_currentName == ENUM_DONE) throw new InvalidOperationException(
SR
.InvalidOperation_EnumEnded);
1090
if (!_currentIsValid) throw new InvalidOperationException(
SR
.InvalidOperation_EnumNotStarted);
1091
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
1106
if (_currentName == ENUM_DONE) throw new InvalidOperationException(
SR
.InvalidOperation_EnumEnded);
1107
if (!_currentIsValid) throw new InvalidOperationException(
SR
.InvalidOperation_EnumNotStarted);
1108
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
1143
if (_currentName == ENUM_DONE) throw new InvalidOperationException(
SR
.InvalidOperation_EnumEnded);
1144
if (!_currentIsValid) throw new InvalidOperationException(
SR
.InvalidOperation_EnumNotStarted);
1145
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
1157
if (_reader._resCache == null) throw new InvalidOperationException(
SR
.ResourceReaderIsClosed);
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);
274
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);