116 references to SR
System.Resources.Extensions (116)
BinaryReaderExtensions.cs (1)
21throw new FormatException(SR.Format_Bad7BitInt32);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (67)
125throw new ArgumentException(SR.Argument_StreamNotReadable); 184throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 222throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r)); 235throw new InvalidOperationException(SR.ResourceReaderIsClosed); 318throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 339throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 348throw new BadImageFormatException(SR.BadImageFormat_ResourcesNameTooLong); 364throw new BadImageFormatException(SR.BadImageFormat_ResourceNameCorrupted); 387throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 393throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index)); 416throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 430throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index)); 436throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 457throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 483throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 496throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 545throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof); 549throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e); 627throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof); 631throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e); 704throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 711throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 718throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 732throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 744throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 758throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch); 786throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, eof); 790throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, e); 804throw new ArgumentException(SR.Resources_StreamNotValid); 813throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 828throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType)); 842throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version)); 848throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 856throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 898throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 919throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 930throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 946throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 955throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 966throw new NotSupportedException(SR.ResourceManager_ReflectionNotAllowed); 971throw new BadImageFormatException(SR.BadImageFormat_InvalidType); 1085if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1086if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1087if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1102if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1103if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1104if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1139if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1140if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1141if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1153if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\runtime\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); 270throw 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);