116 references to SR
System.Resources.Extensions (116)
BinaryReaderExtensions.cs (1)
21throw new FormatException(SR.Format_Bad7BitInt32);
src\libraries\Common\src\System\Resources\ResourceWriter.cs (12)
69throw new ArgumentException(SR.Argument_StreamNotWritable); 86throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 103throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 129throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 149throw new ArgumentException(SR.NotSupported_UnseekableStream); 166throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 177throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 246throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 484throw new PlatformNotSupportedException(SR.NotSupported_BinarySerializedResources); 588throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 598throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 618throw new PlatformNotSupportedException(SR.NotSupported_BinarySerializedResources);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (67)
129throw new ArgumentException(SR.Argument_StreamNotReadable); 188throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 226throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r)); 239throw new InvalidOperationException(SR.ResourceReaderIsClosed); 322throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 343throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 352throw new BadImageFormatException(SR.BadImageFormat_ResourcesNameTooLong); 368throw new BadImageFormatException(SR.BadImageFormat_ResourceNameCorrupted); 391throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 397throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index)); 420throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 434throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index)); 440throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 461throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 487throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 500throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 549throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof); 553throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e); 631throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof); 635throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e); 708throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 715throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 722throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 736throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 748throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 762throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch); 790throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, eof); 794throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, e); 808throw new ArgumentException(SR.Resources_StreamNotValid); 817throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 832throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType)); 846throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version)); 852throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 860throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 902throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 923throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 934throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 950throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 959throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 970throw new NotSupportedException(SR.ResourceManager_ReflectionNotAllowed); 975throw new BadImageFormatException(SR.BadImageFormat_InvalidType); 1089if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1090if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1091if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1106if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1107if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1108if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1143if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1144if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1145if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1157if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (4)
198throw new ArgumentException(SR.Format(SR.NotSupported_WrongResourceReader_Type, reader.GetType()), nameof(reader)); 237ResourceReader reader = _defaultReader ?? throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet); 274throw 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)
41throw new SerializationException(SR.Format(SR.Serialization_TypeNotSerializable, type)); 95throw new SerializationException(SR.Format(SR.Serialization_IObjectReferenceOnlyPrimivite, type));
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordFieldInfoDeserializer.cs (2)
65throw new SerializationException(SR.Format(SR.Serialization_MissingField, field.Name, field.DeclaringType!.Name));
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (2)
170throw new SerializationException(SR.Serialization_Incomplete); 246throw new SerializationException(SR.Serialization_Cycle);
System\Resources\Extensions\BinaryFormat\Deserializer\PendingSerializationInfo.cs (3)
55throw new SerializationException(SR.Serialization_Surrogates); 80throw new SerializationException(SR.Format(SR.Serialization_MissingCtor, type.FullName));
System\Resources\Extensions\DeserializingResourceReader.cs (15)
136throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); 155throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); 165throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); 174throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, type)); 188throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, type)); 200throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, length)); 225throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch); 231throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, value.GetType().FullName));
System\Resources\Extensions\PreserializedResourceWriter.cs (4)
95throw new TypeLoadException(SR.Format(SR.TypeLoadException_CannotLoadConverter, primitiveType)); 172throw new ArgumentException(SR.NotSupported_UnseekableStream); 228throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength);