3468 references to SR
System.Private.CoreLib (3468)
src\Internal\Runtime\InteropServices\ComponentActivator.CoreCLR.cs (1)
22throw new NotSupportedException(SR.NotSupported_CppCli);
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (18)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound); 133new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, path)) : 134new DirectoryNotFoundException(SR.IO_PathNotFound_NoPathName); 141new UnauthorizedAccessException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, path), inner) : 142new UnauthorizedAccessException(SR.UnauthorizedAccess_IODenied_NoPathName, inner); 146new PathTooLongException(SR.Format(SR.IO_PathTooLong_Path, path)) : 147new PathTooLongException(SR.IO_PathTooLong); 151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 158return new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_FileLengthTooBig); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno);
src\libraries\Common\src\System\IO\Win32Marshal.cs (19)
35string.IsNullOrEmpty(path) ? SR.IO_FileNotFound : SR.Format(SR.IO_FileNotFound_FileName, path), path); 38string.IsNullOrEmpty(path) ? SR.IO_PathNotFound_NoPathName : SR.Format(SR.IO_PathNotFound_Path, path)); 41string.IsNullOrEmpty(path) ? SR.UnauthorizedAccess_IODenied_NoPathName : SR.Format(SR.UnauthorizedAccess_IODenied_Path, path)); 45return new IOException(SR.Format(SR.IO_AlreadyExists_Name, path), MakeHRFromErrorCode(errorCode)); 48string.IsNullOrEmpty(path) ? SR.IO_PathTooLong : SR.Format(SR.IO_PathTooLong_Path, path)); 51string.IsNullOrEmpty(path) ? SR.IO_SharingViolation_NoFileName : SR.Format(SR.IO_SharingViolation_File, path), 56return new IOException(SR.Format(SR.IO_FileExists_Name, path), MakeHRFromErrorCode(errorCode));
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (2)
64throw new ArgumentException(SR.Format_StringZeroLength); 84throw new FileLoadException(SR.InvalidAssemblyName, name.ToString());
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
339throw new InvalidOperationException(SR.InvalidOperation_FunctionMissingUnmanagedCallersOnly);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (3)
455throw new IOException(SR.Format(errorInfo.Error == Interop.Error.EFBIG 456? SR.IO_FileTooLarge_Path_AllocationSize 457: SR.IO_DiskFull_Path_AllocationSize,
src\libraries\System.Private.CoreLib\src\System\AccessViolationException.cs (3)
18: base(SR.Arg_AccessViolationException) 24: base(message ?? SR.Arg_AccessViolationException) 30: base(message ?? SR.Arg_AccessViolationException, innerException)
src\libraries\System.Private.CoreLib\src\System\Activator.RuntimeType.cs (4)
26throw new NotSupportedException(SR.NotSupported_CreateInstanceWithTypeBuilder); 34throw new PlatformNotSupportedException(SR.NotSupported_ActivAttr); 37throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 98throw new ArgumentException(SR.Arg_MustBeType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (10)
33: this(SR.AggregateException_ctor_DefaultMessage) 43: base(message ?? SR.AggregateException_ctor_DefaultMessage) 57: base(message ?? SR.AggregateException_ctor_DefaultMessage, innerException) 74this(SR.AggregateException_ctor_DefaultMessage, innerExceptions ?? throw new ArgumentNullException(nameof(innerExceptions))) 88this(SR.AggregateException_ctor_DefaultMessage, innerExceptions ?? throw new ArgumentNullException(nameof(innerExceptions))) 123base(message ?? SR.AggregateException_ctor_DefaultMessage, innerExceptions.Length > 0 ? innerExceptions[0] : null) 133throw new ArgumentException(SR.AggregateException_ctor_InnerExceptionNull); 150this(SR.AggregateException_ctor_DefaultMessage, innerExceptionInfos) 196throw new SerializationException(SR.AggregateException_DeserializationFailure); 379text.AppendFormat(CultureInfo.InvariantCulture, SR.AggregateException_InnerException, i);
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (10)
101throw new ArgumentException(SR.Argument_EmptyString, nameof(assemblyName)); 112throw new PlatformNotSupportedException(SR.PlatformNotSupported_AppDomains); 132throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); // This api is only meaningful for very specific partial trust/CAS scenarios 140throw new MissingMethodException(SR.Arg_EntryPointNotFoundException); 176SR.AppDomain_Name + FriendlyName + Environment.NewLineConst + SR.AppDomain_NoContextPolicies; 183throw new CannotUnloadAppDomainException(SR.Arg_PlatformNotSupported); 205throw new ArgumentException(SR.Arg_MustBeTrue); 286throw new SystemException(SR.AppDomain_Policy_PrincipalTwice); 430throw new PlatformNotSupportedException(SR.PlatformNotSupported_Principal);
src\libraries\System.Private.CoreLib\src\System\AppDomainUnloadedException.cs (3)
15: base(SR.Arg_AppDomainUnloadedException) 21: base(message ?? SR.Arg_AppDomainUnloadedException) 27: base(message ?? SR.Arg_AppDomainUnloadedException, innerException)
src\libraries\System.Private.CoreLib\src\System\ApplicationException.cs (1)
26: base(SR.Arg_ApplicationException)
src\libraries\System.Private.CoreLib\src\System\ArgumentException.cs (6)
23: base(SR.Arg_ArgumentException) 82s += " " + SR.Format(SR.Arg_ParamName_Name, _paramName); 93_message = SR.Arg_ArgumentException; 129throw new ArgumentException(SR.Argument_EmptyString, paramName); 136throw new ArgumentException(SR.Argument_EmptyOrWhiteSpaceString, paramName);
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (4)
21: base(SR.ArgumentNull_Generic) 28: base(SR.ArgumentNull_Generic, paramName) 34: base(message ?? SR.ArgumentNull_Generic, innerException) 40: base(message ?? SR.ArgumentNull_Generic, paramName)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (25)
25: base(SR.Arg_ArgumentOutOfRangeException) 31: base(SR.Arg_ArgumentOutOfRangeException, paramName) 37: base(message ?? SR.Arg_ArgumentOutOfRangeException, paramName) 43: base(message ?? SR.Arg_ArgumentOutOfRangeException, innerException) 49: base(message ?? SR.Arg_ArgumentOutOfRangeException, paramName) 78string valueMessage = SR.Format(SR.ArgumentOutOfRange_ActualValue, _actualValue); 92throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNonZero, paramName, value)); 96throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNonNegative, paramName, value)); 100throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNonNegativeNonZero, paramName, value)); 104throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeLessOrEqual, paramName, value, other)); 108throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeLess, paramName, value, other)); 112throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeGreaterOrEqual, paramName, value, other)); 116throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeGreater, paramName, value, other)); 120throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeNotEqual, paramName, (object?)value ?? "null", (object?)other ?? "null")); 124throw new ArgumentOutOfRangeException(paramName, value, SR.Format(SR.ArgumentOutOfRange_Generic_MustBeEqual, paramName, (object?)value ?? "null", (object?)other ?? "null"));
src\libraries\System.Private.CoreLib\src\System\ArithmeticException.cs (3)
21: base(SR.Arg_ArithmeticException) 31: base(message ?? SR.Arg_ArithmeticException) 37: base(message ?? SR.Arg_ArithmeticException, innerException)
src\libraries\System.Private.CoreLib\src\System\ArrayTypeMismatchException.cs (3)
21: base(SR.Arg_ArrayTypeMismatchException) 31: base(message ?? SR.Arg_ArrayTypeMismatchException) 37: base(message ?? SR.Arg_ArrayTypeMismatchException, innerException)
src\libraries\System.Private.CoreLib\src\System\BadImageFormatException.cs (4)
22: base(SR.Arg_BadImageFormatException) 85_message = SR.Arg_BadImageFormatException; 98s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, _fileName);
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (5)
156throw new ArgumentException(SR.Arg_MustBeBoolean); 338throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Boolean", "Char")); 398throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Boolean", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (4)
25throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(src)); 36throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(dst)); 50throw new ArgumentException(SR.Argument_InvalidOffLen); 61throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (1)
408throw new ArgumentException(SR.Arg_BufferTooSmall, "destination");
src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (1)
236throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
153throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\StandardFormat.cs (4)
116return throws ? throw new FormatException(SR.Format(SR.Argument_CannotParsePrecision, MaxPrecision)) : false; 121return throws ? throw new FormatException(SR.Format(SR.Argument_PrecisionTooLarge, MaxPrecision)) : false;
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Formatter\Utf8Formatter.Integer.cs (1)
338throw new NotSupportedException(SR.Argument_GWithPrecisionNotSupported);
src\libraries\System.Private.CoreLib\src\System\Byte.cs (4)
63throw new ArgumentException(SR.Arg_MustBeByte); 249throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Byte", "DateTime")); 1211static string IBinaryIntegerParseAndFormatInfo<byte>.OverflowMessage => SR.Overflow_Byte;
src\libraries\System.Private.CoreLib\src\System\CannotUnloadAppDomainException.cs (3)
15: base(SR.Arg_CannotUnloadAppDomainException) 21: base(message ?? SR.Arg_CannotUnloadAppDomainException) 27: base(message ?? SR.Arg_CannotUnloadAppDomainException, innerException)
src\libraries\System.Private.CoreLib\src\System\Char.cs (18)
145throw new ArgumentException(SR.Arg_MustBeChar); 519throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Boolean")); 569throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Single")); 574throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Double")); 579throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "Decimal")); 584throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Char", "DateTime")); 1039throw new ArgumentOutOfRangeException(nameof(utf32), SR.ArgumentOutOfRange_InvalidUTF32); 1081message: SR.ArgumentOutOfRange_InvalidHighSurrogate); 1087message: SR.ArgumentOutOfRange_InvalidLowSurrogate); 1133throw new ArgumentException(SR.Format(invalidIsLow ? SR.Argument_InvalidLowSurrogate : SR.Argument_InvalidHighSurrogate, index), nameof(s)); 2013static string IBinaryIntegerParseAndFormatInfo<char>.OverflowMessage => SR.Overflow_Char;
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (111)
39if (capacity < 0) throw new ArgumentOutOfRangeException(nameof(capacity), SR.Format(SR.ArgumentOutOfRange_MustBeNonNegNum, nameof(capacity))); 78throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity); 123if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 128if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 195throw new ArgumentException(SR.Argument_InvalidOffLen); 252throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 265throw new ArgumentException(SR.Argument_InvalidOffLen); 267throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 330throw new ArgumentException(SR.Argument_InvalidOffLen); 359throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 375throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 376if (count < 0 || startIndex > _size - count) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count); 387if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 408if (index < 0 || index > _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 453throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLess); 478throw new ArgumentOutOfRangeException(startIndex >= _size ? nameof(startIndex) : nameof(count), SR.ArgumentOutOfRange_BiggerThanCollection); 516if (index < 0 || index >= _size) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 534throw new ArgumentException(SR.Argument_InvalidOffLen); 580throw new ArgumentException(SR.Argument_InvalidOffLen); 594if (index < 0 || index > _size - count) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 608throw new ArgumentException(SR.Argument_InvalidOffLen); 639throw new ArgumentException(SR.Argument_InvalidOffLen); 722if (value < Count) throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity); 765throw new ArgumentException(SR.Argument_InvalidOffLen); 794throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 826throw new ArgumentException(SR.Argument_InvalidOffLen); 828throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 831throw new ArgumentException(SR.Argument_InvalidOffLen); 848throw new ArgumentException(SR.Argument_InvalidOffLen); 865if (startIndex < 0 || startIndex > Count) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 866if (count < 0 || startIndex > Count - count) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count); 895if (index < 0 || index > Count) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 933if (startIndex < 0 || startIndex >= _list.Count) throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLess); 934if (count < 0 || count > startIndex + 1) throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count); 972throw new ArgumentException(SR.Argument_InvalidOffLen); 990throw new ArgumentException(SR.Argument_InvalidOffLen); 1009throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 1028throw new ArgumentException(SR.Argument_InvalidOffLen); 1037throw new ArgumentException(SR.Argument_InvalidOffLen); 1125throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1127throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1615throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1620throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1645throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1650throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1655throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1691throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1696throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1707set => throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1712throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1764throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1769throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1789throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1794throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1799throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1813throw new ArgumentException(SR.Argument_InvalidOffLen); 1843throw new NotSupportedException(SR.NotSupported_FixedSizeCollection); 1867set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1874throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1879throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1904throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1909throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1914throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1938set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1945throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1950throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1962set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 1967throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2019throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2024throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2044throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2049throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2054throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2059throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2067throw new ArgumentException(SR.Argument_InvalidOffLen); 2074throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2079throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2095throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 2126if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2145throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 2148throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2156if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2183throw new InvalidOperationException(SR.InvalidOperation_UnderlyingArrayListChanged); 2219throw new ArgumentException(SR.Argument_InvalidOffLen); 2234if (value < Count) throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity); 2282throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2285throw new ArgumentException(SR.Argument_InvalidOffLen); 2296throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2300throw new ArgumentException(SR.Argument_InvalidOffLen); 2302throw new ArgumentException(SR.Argument_InvalidOffLen); 2333throw new ArgumentException(SR.Argument_InvalidOffLen); 2344throw new ArgumentException(SR.Argument_InvalidOffLen); 2365throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2376throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2379throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count); 2389if (index < 0 || index > _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2399if (index < 0 || index > _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2432throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLess); 2444if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 2457throw new ArgumentException(SR.Argument_InvalidOffLen); 2475throw new ArgumentException(SR.Argument_InvalidOffLen); 2485if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 2498throw new ArgumentException(SR.Argument_InvalidOffLen); 2510if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 2516if (index < 0 || index >= _baseSize) throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 2545throw new NotSupportedException(SR.NotSupported_RangeCollection); 2574throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2616throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 2620throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2632throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Collections\Comparer.cs (1)
67throw new ArgumentException(SR.Argument_ImplementIComparable);
src\libraries\System.Private.CoreLib\src\System\Collections\CompatibleComparer.cs (1)
44throw new ArgumentException(SR.Argument_ImplementIComparable);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\KeyNotFoundException.cs (3)
15: base(SR.Arg_KeyNotFound) 21: base(message ?? SR.Arg_KeyNotFound) 27: base(message ?? SR.Arg_KeyNotFound, innerException)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (12)
101throw new ArgumentOutOfRangeException(nameof(arrayIndex), arrayIndex, SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 106throw new ArgumentException(SR.Argument_InvalidOffLen); 127throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 132throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 138throw new ArgumentOutOfRangeException(nameof(index), index, SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 143throw new ArgumentException(SR.Argument_InvalidOffLen); 162throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 350throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 445if (_version != _q._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 496throw new InvalidOperationException(_index == -1 ? SR.InvalidOperation_EnumNotStarted : SR.InvalidOperation_EnumEnded); 506if (_version != _q._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (27)
170throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 185throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 205throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 220throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 265throw new ArgumentOutOfRangeException(nameof(loadFactor), SR.ArgumentOutOfRange_HashtableLoadFactor); 272throw new ArgumentException(SR.Arg_HTCapacityOverflow, nameof(capacity)); 577throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 580throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 891throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, _buckets[bucketNumber].key, key)); 935throw new InvalidOperationException(SR.InvalidOperation_HashInsertFailed); 1077throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1097throw new SerializationException(SR.Serialization_InvalidOnDeser); 1154throw new SerializationException(SR.Serialization_MissingKeys); 1158throw new SerializationException(SR.Serialization_MissingValues); 1162throw new SerializationException(SR.Serialization_KeyValueDifferentSizes); 1168throw new SerializationException(SR.Serialization_NullKey); 1194throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1197throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1229throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1232throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1424throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1432throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1454throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1464throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1480throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1488throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (14)
107throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, node.key, key)); 153throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 158throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index)); 230throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 242throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 254throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 264throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 285throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 308throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 311throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index)); 364throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 374throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 395throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (5)
16throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 21throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 29throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 51throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 63throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (18)
57throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 62throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 68set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 87throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 92throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 97throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 119throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 124throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 149throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 172set => throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 197throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 209throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 265throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 270throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 289throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 321throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 326throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection); 342throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
src\libraries\System.Private.CoreLib\src\System\ComponentModel\DefaultValueAttribute.cs (1)
250throw new ArgumentException(SR.RuntimeInstanceNotAllowed);
src\libraries\System.Private.CoreLib\src\System\Context.cs (1)
19public ContextMarshalException() : this(SR.Arg_ContextMarshalException, null)
src\libraries\System.Private.CoreLib\src\System\Convert.cs (33)
138throw new InvalidCastException(SR.InvalidCast_IConvertible); 162TypeCode.DBNull => throw new InvalidCastException(SR.InvalidCast_DBNull), 163TypeCode.Empty => throw new InvalidCastException(SR.InvalidCast_Empty), 164_ => throw new ArgumentException(SR.Arg_UnknownTypeCode), 215throw new InvalidCastException(SR.InvalidCast_DBNull); 217throw new InvalidCastException(SR.InvalidCast_Empty); 219throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName)); 237throw new InvalidCastException(SR.InvalidCast_CannotCastNullToValueType); 248throw new InvalidCastException(SR.InvalidCast_IConvertible); 288private static void ThrowCharOverflowException() { throw new OverflowException(SR.Overflow_Char); } 291private static void ThrowByteOverflowException() { throw new OverflowException(SR.Overflow_Byte); } 294private static void ThrowSByteOverflowException() { throw new OverflowException(SR.Overflow_SByte); } 297private static void ThrowInt16OverflowException() { throw new OverflowException(SR.Overflow_Int16); } 300private static void ThrowUInt16OverflowException() { throw new OverflowException(SR.Overflow_UInt16); } 303private static void ThrowInt32OverflowException() { throw new OverflowException(SR.Overflow_Int32); } 306private static void ThrowUInt32OverflowException() { throw new OverflowException(SR.Overflow_UInt32); } 309private static void ThrowInt64OverflowException() { throw new OverflowException(SR.Overflow_Int64); } 312private static void ThrowUInt64OverflowException() { throw new OverflowException(SR.Overflow_UInt64); } 496throw new FormatException(SR.Format_NeedSingleChar); 1076throw new OverflowException(SR.Overflow_Int32); 1197throw new OverflowException(SR.Overflow_UInt32); 2296private static void ThrowInvalidBase() => throw new ArgumentException(SR.Arg_InvalidBase); 2347throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2394throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2433throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2853throw new FormatException(SR.Format_BadBase64Char); 2911throw new FormatException(SR.Format_BadBase64Char); 2948throw new FormatException(SR.Format_BadHexLength); 2953throw new FormatException(SR.Format_BadHexChar);
src\libraries\System.Private.CoreLib\src\System\CurrentSystemTimeZone.cs (2)
118throw new ArgumentOutOfRangeException(nameof(year), SR.Format(SR.ArgumentOutOfRange_Range, 1, 9999));
src\libraries\System.Private.CoreLib\src\System\DataMisalignedException.cs (3)
18: base(SR.Arg_DataMisalignedException) 24: base(message ?? SR.Arg_DataMisalignedException) 30: base(message ?? SR.Arg_DataMisalignedException, innerException)
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (11)
131static void ThrowOutOfRange() => throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_AddValue); 251throw new ArgumentException(SR.Arg_MustBeDateOnly); 695case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style"); 696case ParseFailureKind.Argument_BadFormatSpecifier: throw new FormatException(SR.Argument_BadFormatSpecifier); 697case ParseFailureKind.Format_BadDateOnly: throw new FormatException(SR.Format(SR.Format_BadDateOnly, s.ToString())); 700throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(DateOnly))); 774throw new FormatException(SR.Format_InvalidString); 828throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(DateOnly)));
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (22)
222private static void ThrowTicksOutOfRange() => throw new ArgumentOutOfRangeException("ticks", SR.ArgumentOutOfRange_DateTimeBadTicks); 223private static void ThrowInvalidKind() => throw new ArgumentException(SR.Argument_InvalidDateTimeKind, "kind"); 224private static void ThrowMillisecondOutOfRange() => throw new ArgumentOutOfRangeException("millisecond", SR.Format(SR.ArgumentOutOfRange_Range, 0, MillisPerSecond - 1)); 225private static void ThrowMicrosecondOutOfRange() => throw new ArgumentOutOfRangeException("microsecond", SR.Format(SR.ArgumentOutOfRange_Range, 0, MicrosecondsPerMillisecond - 1)); 226private static void ThrowDateArithmetic(int param) => throw new ArgumentOutOfRangeException(param switch { 0 => "value", 1 => "t", _ => "months" }, SR.ArgumentOutOfRange_DateArithmetic); 227private static void ThrowAddOutOfRange() => throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_AddValue); 865throw new SerializationException(SR.Serialization_MissingDateTimeData); 870throw new SerializationException(SR.Serialization_DateTimeTicksOutOfRange); 983if (months < -120000 || months > 120000) throw new ArgumentOutOfRangeException(nameof(months), SR.ArgumentOutOfRange_DateTimeBadMonths); 1044throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_DateTimeBadYears); 1088throw new ArgumentException(SR.Arg_MustBeDateTime); 1183throw new ArgumentException(SR.Arg_OleAutDateInvalid); 1197if (millis < 0 || millis > MaxMillis) throw new ArgumentException(SR.Arg_OleAutDateScale); 1267throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData)); 1274throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData)); 1292throw new ArgumentOutOfRangeException(nameof(fileTime), SR.ArgumentOutOfRange_FileTimeInvalid); 1702throw new OverflowException(SR.Arg_OleAutDateInvalid); 1740throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_FileTimeInvalid); 2007private static InvalidCastException InvalidCast(string to) => new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, nameof(DateTime), to));
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (20)
107throw new ArgumentException(SR.Argument_OffsetLocalMismatch, nameof(offset)); 114throw new ArgumentException(SR.Argument_OffsetUtcMismatch, nameof(offset)); 150throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond); 172throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond); 194throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond); 255throw new ArgumentOutOfRangeException(nameof(microsecond), SR.ArgumentOutOfRange_BadHourMinuteSecond); 332throw new ArgumentOutOfRangeException(nameof(microsecond), SR.ArgumentOutOfRange_BadHourMinuteSecond); 576throw new ArgumentException(SR.Arg_MustBeDateTimeOffset); 634SR.Format(SR.ArgumentOutOfRange_Range, UnixMinSeconds, UnixMaxSeconds)); 649SR.Format(SR.ArgumentOutOfRange_Range, MinMilliseconds, MaxMilliseconds)); 667throw new SerializationException(SR.Serialization_InvalidData, e); 842throw new ArgumentException(SR.Arg_ArgumentOutOfRangeException); 980throw new ArgumentException(SR.Argument_OffsetPrecision, nameof(offset)); 984throw new ArgumentOutOfRangeException(nameof(offset), SR.Argument_OffsetOutOfRange); 1001throw new ArgumentOutOfRangeException(nameof(offset), SR.Argument_UTCOutOfRange); 1012throw new ArgumentException(SR.Argument_InvalidDateTimeStyles, parameterName); 1016throw new ArgumentException(SR.Argument_ConflictingDateTimeStyles, parameterName); 1020throw new ArgumentException(SR.Argument_DateTimeOffsetInvalidDateTimeStyles, parameterName);
src\libraries\System.Private.CoreLib\src\System\DBNull.cs (14)
44throw new InvalidCastException(SR.InvalidCast_FromDBNull); 49throw new InvalidCastException(SR.InvalidCast_FromDBNull); 54throw new InvalidCastException(SR.InvalidCast_FromDBNull); 59throw new InvalidCastException(SR.InvalidCast_FromDBNull); 64throw new InvalidCastException(SR.InvalidCast_FromDBNull); 69throw new InvalidCastException(SR.InvalidCast_FromDBNull); 74throw new InvalidCastException(SR.InvalidCast_FromDBNull); 79throw new InvalidCastException(SR.InvalidCast_FromDBNull); 84throw new InvalidCastException(SR.InvalidCast_FromDBNull); 89throw new InvalidCastException(SR.InvalidCast_FromDBNull); 94throw new InvalidCastException(SR.InvalidCast_FromDBNull); 99throw new InvalidCastException(SR.InvalidCast_FromDBNull); 104throw new InvalidCastException(SR.InvalidCast_FromDBNull); 109throw new InvalidCastException(SR.InvalidCast_FromDBNull);
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (16)
304throw new ArgumentException(SR.Arg_DecBitCtor); 324throw new SerializationException(SR.Overflow_Decimal); 337throw new ArgumentException(SR.Arg_DecBitCtor); 424throw new ArgumentException(SR.Arg_MustBeDecimal); 686throw new ArgumentOutOfRangeException(nameof(decimals), SR.ArgumentOutOfRange_DecimalRound); 688throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, nameof(MidpointRounding)), nameof(mode)); 793throw new OverflowException(SR.Overflow_Int32); 816throw new OverflowException(SR.Overflow_Int64); 854throw new OverflowException(SR.Overflow_UInt32); 871throw new OverflowException(SR.Overflow_UInt64); 940throw new OverflowException(SR.Overflow_Char, e); 1041throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Decimal", "Char")); 1101throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Decimal", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (9)
184Number.ThrowOverflowException(SR.Overflow_Decimal); 666Number.ThrowOverflowException(SR.Overflow_Decimal); 708Number.ThrowOverflowException(SR.Overflow_Decimal); 820Number.ThrowOverflowException(SR.Overflow_Decimal); 1090Number.ThrowOverflowException(SR.Overflow_Decimal); 1209throw new OverflowException(SR.Overflow_Currency); 1514Number.ThrowOverflowException(SR.Overflow_Decimal); 1678Number.ThrowOverflowException(SR.Overflow_Decimal); 2147Number.ThrowOverflowException(SR.Overflow_Decimal);
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (7)
36throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 296throw new MissingMethodException(SR.MissingMember); 509throw new MissingFieldException(SR.MissingField); 550throw new ArgumentException(SR.Arg_MustBeType, nameof(types)); 556throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 646throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 752throw new NotSupportedException(SR.NotSupported_ChangeType);
src\libraries\System.Private.CoreLib\src\System\Delegate.cs (2)
71protected virtual Delegate CombineImpl(Delegate? d) => throw new MulticastNotSupportedException(SR.Multicast_Combine); 161throw new ArgumentException(SR.Arg_DlgtTypeMis);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (6)
519throw new ArgumentException(SR.Argument_ToExclusiveLessThanFromExclusive); 566throw new ArgumentException(SR.Argument_ToExclusiveLessThanFromExclusive); 638ContractHelper.TriggerFailure(kind, SR.Format(SR.MustUseCCRewrite, contractKind, simpleName), null, null, null); 654throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebugProvider.cs (3)
36WriteLine(SR.DebugAssertBanner + Environment.NewLineConst 37+ SR.DebugAssertShortMessage + Environment.NewLineConst 39+ SR.DebugAssertLongMessage + Environment.NewLineConst
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (8)
214string word_At = SR.UsingResourceKeys() ? "at" : SR.Word_At; 216string inFileLineNum = SR.UsingResourceKeys() ? "in {0}:line {1}" : SR.StackTrace_InFileLineNumber; 217string inFileILOffset = SR.UsingResourceKeys() ? "in {0}:token 0x{1:x}+0x{2:x}" : SR.StackTrace_InFileILOffset; 359sb.Append(SR.UsingResourceKeys() ? "--- End of stack trace from previous location ---" : SR.Exception_EndStackTraceFromPreviousThrow);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventDescriptor.cs (4)
63throw new ArgumentOutOfRangeException(nameof(id), SR.Format(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue)); 78throw new ArgumentOutOfRangeException(nameof(task), SR.Format(SR.ArgumentOutOfRange_NeedValidId, 1, ushort.MaxValue));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
107throw new EventSourceException(SR.EventSource_CouldNotEnableEventPipe);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (84)
323throw new ArgumentException(SR.Argument_InvalidTypeName, nameof(eventSourceType)); 440throw new ArgumentException(SR.EventSource_InvalidCommand, nameof(command)); 488return SR.Format(SR.EventSource_ToString, Name, Guid); 1578throw new ArgumentException(SR.EventSource_TraitEven, nameof(traits)); 1583throw new ArgumentException(SR.EventSource_NeedGuid); 1588throw new ArgumentException(SR.EventSource_NeedName); 1921throw new ArgumentException(SR.EventSource_NoRelatedActivityId); 2036ReportOutOfBandMessage(SR.Format(SR.EventSource_EventParametersMismatch, eventId, args.Length, infos.Length)); 2052ReportOutOfBandMessage(SR.Format(SR.EventSource_VarArgsParameterMismatch, eventId, infos[i].Name)); 2065ReportOutOfBandMessage(SR.Format(SR.EventSource_EventParametersMismatch, eventCallbackArgs.EventId, eventDataCount, metadata.Parameters.Length)); 2348ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_EventTooBig); 2349if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_EventTooBig, innerEx); 2352ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_NoFreeBuffers); 2353if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_NoFreeBuffers, innerEx); 2356ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_NullInput); 2357if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_NullInput, innerEx); 2360ReportOutOfBandMessage(errorPrefix + ": " + SR.EventSource_TooManyArgs); 2361if (ThrowOnEventWriteErrors) throw new EventSourceException(SR.EventSource_TooManyArgs, innerEx); 2605throw new ArgumentException(SR.EventSource_ListenerNotFound); 2817throw new ArgumentException(SR.Format(SR.EventSource_EventSourceGuidInUse, m_guid)); 3124manifest.ManifestError(SR.EventSource_TypeMustDeriveFromEventSource); 3128manifest.ManifestError(SR.EventSource_TypeMustBeSealedOrAbstract); 3140manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareKTOC, nestedType.Name)); 3182manifest.ManifestError(SR.Format(SR.EventSource_AbstractMustNotDeclareEventMethods, method.Name, eventAttribute.EventId)); 3211manifest.ManifestError(SR.EventSource_NeedPositiveId, true); 3216manifest.ManifestError(SR.Format(SR.EventSource_EventMustNotBeExplicitImplementation, method.Name, eventAttribute.EventId)); 3272throw new ArgumentException(SR.EventSource_StopsFollowStarts); 3421manifest.ManifestError(SR.Format(SR.EventSource_EnumKindMismatch, staticField.FieldType.Name, providerEnumKind)); 3541manifest.ManifestError(SR.Format(SR.EventSource_MismatchIdToWriteEvent, evtName, evtId, eventArg), true); 3546manifest.ManifestError(SR.Format(SR.EventSource_EventIdReused, evtName, evtId), true); 3560manifest.ManifestError(SR.Format(SR.EventSource_TaskOpcodePairReused, 3585manifest.ManifestError(SR.Format(SR.EventSource_EventMustHaveTaskIfNonDefaultOpcode, evtName, evtId)); 3602manifest.ManifestError(SR.Format(SR.EventSource_EventNameReused, evtName), true); 3783throw new ArgumentException(SR.EventSource_InvalidEventFormat, nameof(settings)); 4438throw new InvalidOperationException(SR.EventSource_ListenerCreatedInsideCallback); 5191ManifestError(SR.Format(SR.EventSource_IllegalOpcodeValue, name, value)); 5196ManifestError(SR.Format(SR.EventSource_OpcodeCollision, name, prevName, value)); 5209ManifestError(SR.Format(SR.EventSource_IllegalTaskValue, name, value)); 5214ManifestError(SR.Format(SR.EventSource_TaskCollision, name, prevName, value)); 5226ManifestError(SR.Format(SR.EventSource_KeywordNeedPowerOfTwo, $"0x{value:x}", name), true); 5232ManifestError(SR.Format(SR.EventSource_IllegalKeywordsValue, name, $"0x{value:x}")); 5237ManifestError(SR.Format(SR.EventSource_KeywordCollision, name, prevName, $"0x{value:x}")); 5252ManifestError(SR.Format(SR.EventSource_EventChannelOutOfRange, name, value)); 5258ManifestError(SR.Format(SR.EventSource_ChannelTypeDoesNotMatchEventChannelValue, 5436ManifestError(SR.EventSource_MaxChannelExceeded); 5703ManifestError(SR.Format(SR.EventSource_DuplicateStringKey, key), true); 5755ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName)); 5767ManifestError(SR.Format(SR.EventSource_UndefinedChannel, channel, eventName)); 5775ManifestError(SR.Format(SR.EventSource_EventWithAdminChannelMustHaveMessage, eventName, info.Name)); 5819ManifestError(SR.Format(SR.EventSource_UndefinedOpcode, opcode, eventName), true); 5847ManifestError(SR.Format(SR.EventSource_UndefinedKeyword, "0x" + bit.ToString("x", CultureInfo.CurrentCulture), eventName), true); 5917ManifestError(SR.Format(SR.EventSource_UnsupportedEventTypeInManifest, type.Name), true); 5991ManifestError(SR.Format(SR.EventSource_UnsupportedMessageProperty, evtName, eventMessage));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSourceException.cs (4)
20base(SR.EventSource_ListenerWriteFailure) { } 25public EventSourceException(string? message) : base(message ?? SR.EventSource_ListenerWriteFailure) { } 31public EventSourceException(string? message, Exception? innerException) : base(message ?? SR.EventSource_ListenerWriteFailure, innerException) { } 41base(SR.EventSource_ListenerWriteFailure, innerException) { }
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (4)
82throw new IndexOutOfRangeException(SR.EventSource_AddScalarOutOfRange); 314throw new IndexOutOfRangeException(SR.EventSource_PinArrayOutOfRange); 320throw new IndexOutOfRangeException(SR.EventSource_DataDescriptorsOutOfRange); 338throw new IndexOutOfRangeException(SR.EventSource_DataDescriptorsOutOfRange);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventPayload.cs (2)
44throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\FieldMetadata.cs (4)
123throw new NotSupportedException(SR.EventSource_NotSupportedArrayOfNil); 127throw new NotSupportedException(SR.EventSource_NotSupportedArrayOfBinary); 132throw new NotSupportedException(SR.EventSource_NotSupportedArrayOfNullTerminatedString); 153throw new NotSupportedException(SR.EventSource_TooManyFields);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (3)
402throw new NotSupportedException(SR.EventSource_RecursiveTypeDefinition); 585throw new ArgumentException(SR.Format(SR.EventSource_NonCompliantTypeError, dataType.Name));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (7)
759throw new ArgumentException(SR.Format(SR.EventSource_UnknownEtwTrait, etwTrait.ToString()), "traits"); 815throw new ArgumentException(SR.EventSource_EvenHexDigits, "traits"); 828throw new ArgumentException(SR.Format(SR.EventSource_IllegalValue, value), "traits"); 852throw new ArgumentException(SR.Format(SR.EventSource_BadHexDigit, c), "traits");
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingMetadataCollector.cs (4)
238throw new NotSupportedException(SR.EventSource_NotSupportedNestedArraysEnums); 250throw new NotSupportedException(SR.EventSource_NotSupportedNestedArraysEnums); 261throw new InvalidOperationException(SR.EventSource_IncorrentlyAuthoredTypeInfo); 280throw new NotSupportedException(SR.EventSource_NotSupportedCustomSerializedData);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\UnreachableException.cs (3)
15: base(SR.Arg_UnreachableException) 25: base(message ?? SR.Arg_UnreachableException) 37: base(message ?? SR.Arg_UnreachableException, innerException)
src\libraries\System.Private.CoreLib\src\System\DivideByZeroException.cs (3)
18: base(SR.Arg_DivideByZero) 24: base(message ?? SR.Arg_DivideByZero) 30: base(message ?? SR.Arg_DivideByZero, innerException)
src\libraries\System.Private.CoreLib\src\System\DllNotFoundException.cs (3)
18: base(SR.Arg_DllNotFoundException) 24: base(message ?? SR.Arg_DllNotFoundException) 30: base(message ?? SR.Arg_DllNotFoundException, inner)
src\libraries\System.Private.CoreLib\src\System\Double.cs (5)
267return (value is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeDouble); 459throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "Char")); 519throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\DuplicateWaitObjectException.cs (4)
20: base(SR.Arg_DuplicateWaitObjectException) 26: base(SR.Arg_DuplicateWaitObjectException, parameterName) 32: base(message ?? SR.Arg_DuplicateWaitObjectException, parameterName) 38: base(message ?? SR.Arg_DuplicateWaitObjectException, innerException)
src\libraries\System.Private.CoreLib\src\System\EntryPointNotFoundException.cs (3)
18: base(SR.Arg_EntryPointNotFoundException) 24: base(message ?? SR.Arg_EntryPointNotFoundException) 30: base(message ?? SR.Arg_EntryPointNotFoundException, inner)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (20)
406throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 889throw new ArgumentException(SR.Arg_MustBeEnum, nameof(TEnum)); 1123throw new ArgumentException(SR.Format(SR.Arg_EnumValueNotFound, originalValue.ToString())); 1291throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1604throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 1638throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType)); 1651throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 2149throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType)); 2152throw new ArgumentException(SR.Arg_MustContainEnumInfo, "value"); 2156new FormatException(SR.Format_InvalidEnumFormatSpecification); 2160new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 2192DateTime IConvertible.ToDateTime(IFormatProvider? provider) => throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Enum", "DateTime")); 2224throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Environment.cs (8)
128throw new ArgumentOutOfRangeException(nameof(folder), folder, SR.Format(SR.Arg_EnumIllegalVal, folder)); 131throw new ArgumentOutOfRangeException(nameof(option), option, SR.Format(SR.Arg_EnumIllegalVal, option)); 234throw new ArgumentOutOfRangeException(nameof(target), target, SR.Format(SR.Arg_EnumIllegalVal, target)); 242throw new ArgumentException(SR.Argument_StringFirstCharIsZero, nameof(variable)); 245throw new ArgumentException(SR.Argument_IllegalEnvVarName, nameof(variable));
src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Windows.cs (1)
57throw new ArgumentException(SR.Argument_LongEnvVarValue);
src\libraries\System.Private.CoreLib\src\System\Exception.cs (7)
61public virtual string Message => _message ?? SR.Format(SR.Exception_WasThrown, GetClassName()); 129string endOfInnerExceptionResource = SR.Exception_EndOfInnerExceptionStack; 190add { throw new PlatformNotSupportedException(SR.PlatformNotSupported_SecureBinarySerialization); } 191remove { throw new PlatformNotSupportedException(SR.PlatformNotSupported_SecureBinarySerialization); } 248sb.AppendLine(SR.Exception_EndStackTraceFromPreviousThrow); 261_remoteStackTraceString = stackTrace + Environment.NewLineConst + SR.Exception_EndStackTraceFromPreviousThrow + Environment.NewLineConst;
src\libraries\System.Private.CoreLib\src\System\ExecutionEngineException.cs (3)
18: base(SR.Arg_ExecutionEngineException) 24: base(message ?? SR.Arg_ExecutionEngineException) 30: base(message ?? SR.Arg_ExecutionEngineException, innerException)
src\libraries\System.Private.CoreLib\src\System\FieldAccessException.cs (3)
18: base(SR.Arg_FieldAccessException) 24: base(message ?? SR.Arg_FieldAccessException) 30: base(message ?? SR.Arg_FieldAccessException, inner)
src\libraries\System.Private.CoreLib\src\System\FormatException.cs (3)
18: base(SR.Arg_FormatException) 24: base(message ?? SR.Arg_FormatException) 30: base(message ?? SR.Arg_FormatException, innerException)
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (11)
104throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 139throw new ArgumentException(SR.Format(SR.Argument_ResultCalendarRange, minValue, maxValue)); 155throw new ArgumentOutOfRangeException(nameof(value), value, SR.ArgumentOutOfRange_AddValue); 506SR.Format(SR.ArgumentOutOfRange_Range, DayOfWeek.Sunday, DayOfWeek.Saturday)); 517SR.Format(SR.ArgumentOutOfRange_Range, CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek)), 696throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond); 703SR.Format(SR.ArgumentOutOfRange_Range, 0, MillisPerSecond - 1));
src\libraries\System.Private.CoreLib\src\System\Globalization\ChineseLunisolarCalendar.cs (5)
258throw new ArgumentOutOfRangeException("year", lunarYear, SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear)); 273throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 277throw new ArgumentOutOfRangeException(nameof(year), year, SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (8)
70throw new ArgumentException(SR.Argument_OnlyMscorlib, nameof(assembly)); 88throw new ArgumentException(SR.Argument_OnlyMscorlib, nameof(assembly)); 102throw new ArgumentException(SR.Argument_CustomCultureCannotBePassedByNumber, nameof(culture)); 392throw new ArgumentOutOfRangeException(nameof(string1), SR.ArgumentOutOfRange_OffsetLength); 396throw new ArgumentOutOfRangeException(nameof(string2), SR.ArgumentOutOfRange_OffsetLength); 484message: ((options & CompareOptions.Ordinal) != 0) ? SR.Argument_CompareOptionOrdinal : SR.Argument_InvalidFlag); 1373throw new ArgumentException(paramName: nameof(options), message: SR.Argument_InvalidFlag);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (5)
713throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 747throw new ArgumentException(SR.Arg_ExternalException); 800throw new ArgumentException(SR.Arg_ExternalException); 939throw new ArgumentException(SR.Arg_ExternalException); 1000throw new ExternalException(SR.Arg_ExternalException);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (2)
18throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 124message: SR.ArgumentOutOfRange_GetByteCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (9)
147throw new ArgumentException(SR.Arg_ExternalException); 168throw new ArgumentException(SR.Arg_ExternalException); 202throw new ArgumentException(SR.Arg_ExternalException); 250throw new ArgumentException(SR.Arg_ExternalException); 378throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 402throw new ArgumentException(SR.Arg_ExternalException); 415throw new ArgumentException(SR.Arg_ExternalException); 515throw new ArgumentException(SR.Arg_ExternalException); 560throw new ArgumentException(SR.Arg_ExternalException);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (7)
522SR.Format(SR.ArgumentOutOfRange_Range, CultureTypes.NeutralCultures, CultureTypes.FrameworkCultures)); 732throw new ArgumentException(SR.Format(SR.Argument_InvalidId, nameof(name))); 881throw new CultureNotFoundException(nameof(culture), culture, SR.Argument_CultureNotSupported); 888throw new CultureNotFoundException(nameof(culture), culture, SR.Argument_CultureNotSupportedInInvariantMode); 903throw new CultureNotFoundException(nameof(culture), culture, SR.Argument_CultureNotSupported);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (14)
156private static string GetCultureNotSupportedExceptionMessage() => GlobalizationMode.Invariant ? SR.Argument_CultureNotSupportedInInvariantMode : SR.Argument_CultureNotSupported; 217throw new CultureNotFoundException(nameof(culture), culture, SR.Argument_CultureNotSupported); 341throw new ArgumentException(SR.Format(SR.Argument_InvalidResourceCultureName, cultureName)); 1003throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1117throw new CultureNotFoundException("name/altName", SR.Format(SR.Argument_OneOfCulturesNotSupported, name, altName)); 1137throw new CultureNotFoundException(nameof(name), name, SR.Format(SR.Argument_InvalidPredefinedCultureName, name)); 1179throw new CultureNotFoundException(nameof(name), SR.Format(SR.Argument_CultureIetfNotSupported, name)); 1187throw new CultureNotFoundException(nameof(name), SR.Format(SR.Argument_CultureIetfNotSupported, name));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (3)
83private static string DefaultMessage => SR.Argument_CultureNotSupported; 97string valueMessage = SR.Format(SR.Argument_CultureInvalidIdentifier, FormattedInvalidCultureId);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (17)
318throw new FormatException(SR.Format_InvalidString); 330throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 524throw new FormatException(SR.Format_InvalidString); 706throw new FormatException(SR.Format_InvalidString); 730throw new FormatException(SR.Format_InvalidString); 914_ => throw new FormatException(SR.Format_InvalidString), 1163throw new FormatException(SR.Format_InvalidString); 1189throw new FormatException(SR.Format_InvalidString); 1210throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 1232throw new FormatException(SR.Format_InvalidString); 1261throw new FormatException(SR.Format_InvalidString); 1282throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 1299throw new FormatException(SR.Format_InvalidString); 1765throw new FormatException(SR.Format_InvalidString);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (53)
347throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 377throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 453throw new ArgumentOutOfRangeException(nameof(value), value, SR.Argument_InvalidCalendar); 532throw new ArgumentOutOfRangeException(nameof(era), era + 1, SR.ArgumentOutOfRange_InvalidEraValue); 561throw new ArgumentOutOfRangeException(nameof(era), era + 1, SR.ArgumentOutOfRange_InvalidEraValue); 596throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 630throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 638SR.Format(SR.ArgumentOutOfRange_Range, DayOfWeek.Sunday, DayOfWeek.Saturday)); 661throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 668SR.Format(SR.ArgumentOutOfRange_Range, CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek)); 682throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 703throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 737throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 779throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 799throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 833throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 869throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 981throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1015throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1043throw new ArgumentNullException("value", SR.ArgumentNull_ArrayValue); 1055throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1060throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1080throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1085throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1100throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1105throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1122throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1127throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1143throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1148throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1353throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1625throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1631throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(patterns)); 1638throw new ArgumentNullException(nameof(patterns) + "[" + i + "]", SR.ArgumentNull_ArrayValue); 1677throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1688throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1693throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1709throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1714throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1772string message = (style & InvalidDateTimeStyles) != 0 ? SR.Argument_InvalidDateTimeStyles 1773: (style & localUniversal) == localUniversal ? SR.Argument_ConflictingDateTimeStyles 1774: SR.Argument_ConflictingDateTimeRoundtripStyles;
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (26)
5183return new ArgumentNullException("formats", SR.ArgumentNull_String); 5185return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument))); 5187return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument))); 5189return new FormatException(SR.Format(SR.Format_BadDateTimeCalendar, new string(result.failureSpanArgument), result.calendar)); 5191return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument))); 5193return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument))); 5195return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument)); 5197return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument))); 5199return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument))); 5201return new FormatException(SR.Format_NoFormatSpecifier); 5203return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument))); 5205return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument)); 5207return new FormatException(SR.Format(SR.Format_UnknownDateTimeWord, new string(result.failureSpanArgument), result.failureIntArgument)); 5209return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument)));
src\libraries\System.Private.CoreLib\src\System\Globalization\EastAsianLunisolarCalendar.cs (20)
41SR.Format(SR.ArgumentOutOfRange_Range, 1, 60)); 58SR.Format(SR.ArgumentOutOfRange_Range, 1, 60)); 104throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 134throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 148SR.Format(CultureInfo.InvariantCulture, SR.ArgumentOutOfRange_CalendarRange, 162throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 176SR.Format(SR.ArgumentOutOfRange_Range, MinEraCalendarYear(era), MaxEraCalendarYear(era))); 253SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 258throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 431SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000)); 604SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 669SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendar.cs (31)
54SR.Format(SR.ArgumentOutOfRange_Range, GregorianCalendarTypes.Localized, GregorianCalendarTypes.TransliteratedFrench)); 71SR.Format(SR.ArgumentOutOfRange_Range, GregorianCalendarTypes.Localized, GregorianCalendarTypes.TransliteratedFrench)); 107throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 144SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000)); 215throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 228throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 250throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 257SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear)); 296SR.Format(SR.ArgumentOutOfRange_Range, 1, 12)); 301throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 308SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear)); 315SR.Format(SR.ArgumentOutOfRange_Range, 1, GetDaysInMonth(year, month))); 330throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 337SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear)); 351throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 358SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear)); 365SR.Format(SR.ArgumentOutOfRange_Range, 1, 12)); 379throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 392throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 430SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendarHelper.cs (18)
81throw new ArgumentOutOfRangeException(nameof(year), SR.ArgumentOutOfRange_NeedNonNegNum); 132SR.Format( 133SR.ArgumentOutOfRange_Range, 144throw new ArgumentOutOfRangeException(nameof(era), SR.ArgumentOutOfRange_InvalidEraValue); 199throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 215SR.Format( 217SR.ArgumentOutOfRange_CalendarRange, 246SR.Format( 247SR.ArgumentOutOfRange_Range, 360throw new ArgumentOutOfRangeException(nameof(time), SR.ArgumentOutOfRange_Era); 408throw new ArgumentException(SR.Argument_NoEra); 429throw new ArgumentException(SR.Argument_NoEra); 442SR.Format( 443SR.ArgumentOutOfRange_Range, 482SR.Format( 483SR.ArgumentOutOfRange_Range, 530SR.Format(SR.ArgumentOutOfRange_Range, m_minYear, m_maxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (13)
299SR.Format(SR.ArgumentOutOfRange_Range, MinHebrewYear, MaxHebrewYear)); 317SR.Format(SR.ArgumentOutOfRange_Range, 1, monthsInYear)); 335SR.Format(SR.ArgumentOutOfRange_Range, 1, daysInMonth)); 343throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 355SR.Format( 357SR.ArgumentOutOfRange_CalendarRange, 370_ => throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing), 575throw new ArgumentOutOfRangeException(nameof(months), months, SR.ArgumentOutOfRange_AddValue); 884SR.Format(SR.ArgumentOutOfRange_Range, MinHebrewYear, MaxHebrewYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\HijriCalendar.cs (21)
127SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, MinAdvancedHijri, MaxAdvancedHijri)); 142SR.Format( 144SR.ArgumentOutOfRange_CalendarRange, 154throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 165SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear)); 179SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarMonth)); 264throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing); 274SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000)); 374SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 407SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 413throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 440SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear)); 461SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (49)
73throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 75throw new ArgumentOutOfRangeException(nameof(unicode), SR.ArgumentOutOfRange_IndexCountBuffer); 79throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode)); 120throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 122throw new ArgumentOutOfRangeException(nameof(ascii), SR.ArgumentOutOfRange_IndexCountBuffer); 128throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 204throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode)); 222throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 232throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode)); 244throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 248throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 268throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 272throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 311throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 333throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 362throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 381throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 388throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 414throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(unicode)); 499throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 511throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 538throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c)); 553throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 583throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 587throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 610throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 618throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 638throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 653throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 688throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 695throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 703throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 714throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 720throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 735throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 779throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 786throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 792throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 804throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[output.Length - 1]) ? 0 : 1)), nameof(ascii)); 827throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(cp));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (5)
39throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 48throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 89throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 104throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 137throw new ArgumentException(SR.Argument_IdnIllegalName, paramName);
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Nls.cs (3)
123lastError == Interop.Errors.ERROR_INVALID_NAME ? SR.Argument_IdnIllegalName : 124(unicode ? SR.Argument_InvalidCharSequenceNoIndex : SR.Argument_IdnBadPunycode),
src\libraries\System.Private.CoreLib\src\System\Globalization\ISOWeek.cs (4)
89throw new ArgumentOutOfRangeException(nameof(year), SR.ArgumentOutOfRange_Year); 116throw new ArgumentOutOfRangeException(nameof(year), SR.ArgumentOutOfRange_Year); 121throw new ArgumentOutOfRangeException(nameof(week), SR.ArgumentOutOfRange_Week_ISO); 129throw new ArgumentOutOfRangeException(nameof(dayOfWeek), SR.ArgumentOutOfRange_DayOfWeek);
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (2)
276SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseLunisolarCalendar.cs (2)
148SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\JulianCalendar.cs (15)
56throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 68SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxYear)); 94throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 106SR.Format(SR.ArgumentOutOfRange_Range, 1, monthDays)); 187SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000)); 311SR.Format(SR.ArgumentOutOfRange_Range, 0, MillisPerSecond - 1)); 316throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond); 333SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxYear)); 348SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, 1, MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (2)
169SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanLunisolarCalendar.cs (5)
1190SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear)); 1205throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 1212SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (5)
35throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 75throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 102throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 126throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm)); 131throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput));
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (8)
41throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm)); 44throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 50throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError)); 119throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm)); 123throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 130throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError));
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (13)
110throw new ArgumentException(SR.Argument_InvalidNativeDigitCount, propertyName); 117throw new ArgumentNullException(propertyName, SR.ArgumentNull_ArrayValue); 125throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 130throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 139throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 155throw new ArgumentException(SR.Argument_InvalidDigitSubstitution, propertyName); 198throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 294throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 298throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 823(value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_InvalidHexBinaryStyle, 837throw new ArgumentException((value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_HexBinaryStylesNotSupported, nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (20)
62throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 80SR.Format(SR.ArgumentOutOfRange_CalendarRange, s_minDate, s_maxDate)); 88throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 100SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear)); 114SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarMonth)); 188throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing); 226SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000)); 338SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 377SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 384throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 411SR.Format(SR.ArgumentOutOfRange_Range, 99, MaxCalendarYear)); 431SR.Format(SR.ArgumentOutOfRange_Range, 1, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (12)
33throw new ArgumentException(SR.Argument_NoRegionInvariantCulture, nameof(name)); 38throw new ArgumentException(SR.Format(SR.Argument_InvalidCultureName, name), nameof(name)); 43throw new ArgumentException(SR.Format(SR.Argument_InvalidNeutralRegionName, name), nameof(name)); 54throw new ArgumentException(SR.Argument_NoRegionInvariantCulture); 60throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture)); 66throw new ArgumentException(SR.Format(SR.Argument_CustomCultureCannotBePassedByNumber, culture), nameof(culture)); 75throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
src\libraries\System.Private.CoreLib\src\System\Globalization\StringInfo.cs (2)
80throw new ArgumentOutOfRangeException(nameof(startingTextElement), startingTextElement, SR.Arg_ArgumentOutOfRangeException); 84throw new ArgumentOutOfRangeException(nameof(lengthInTextElements), lengthInTextElements, SR.Arg_ArgumentOutOfRangeException);
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (2)
168SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanLunisolarCalendar.cs (2)
204SR.Format(SR.ArgumentOutOfRange_Range, MinLunisolarYear, MaxLunisolarYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\TextElementEnumerator.cs (2)
59throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 75throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (1)
113throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (1)
39throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\ThaiBuddhistCalendar.cs (2)
150SR.Format(SR.ArgumentOutOfRange_Range, 99, _helper.MaxYear));
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (3)
40throw new FormatException(SR.Format_InvalidString); 72throw new FormatException(SR.Format_InvalidString); 451throw new FormatException(SR.Format_InvalidString);
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (10)
513throw new FormatException(SR.Format_NoFormatSpecifier); 523throw new FormatException(SR.Format(SR.Format_BadQuote, failingCharacter)); 533throw new FormatException(SR.Format_InvalidString); 554throw new OverflowException(SR.Format(SR.Overflow_TimeSpanElementTooLarge, new string(_originalTimeSpanString))); 564throw new FormatException(SR.Format(SR.Format_BadTimeSpan, new string(_originalTimeSpanString))); 574throw new FormatException(SR.Format(SR.Format_BadFormatSpecifier, formatSpecifierCharacter));
src\libraries\System.Private.CoreLib\src\System\Globalization\UmAlQuraCalendar.cs (17)
300SR.Format( 302SR.ArgumentOutOfRange_CalendarRange, 312throw new ArgumentOutOfRangeException(nameof(era), era, SR.ArgumentOutOfRange_InvalidEraValue); 324SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear)); 407throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing); 417SR.Format(SR.ArgumentOutOfRange_Range, -120000, 120000)); 546SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 585SR.Format(SR.ArgumentOutOfRange_Day, daysInMonth, month)); 591throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 617SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear)); 640SR.Format(SR.ArgumentOutOfRange_Range, MinCalendarYear, MaxCalendarYear));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (18)
90throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "16"), "b"); 116throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "8"), nameof(d)); 214throw new OverflowException(SR.Overflow_UInt32); 219ParseFailure.Format_ExtraJunkAtEnd => SR.Format_ExtraJunkAtEnd, 220ParseFailure.Format_GuidBraceAfterLastNumber => SR.Format_GuidBraceAfterLastNumber, 221ParseFailure.Format_GuidBrace => SR.Format_GuidBrace, 222ParseFailure.Format_GuidComma => SR.Format_GuidComma, 223ParseFailure.Format_GuidDashes => SR.Format_GuidDashes, 224ParseFailure.Format_GuidEndBrace => SR.Format_GuidEndBrace, 225ParseFailure.Format_GuidHexPrefix => SR.Format_GuidHexPrefix, 226ParseFailure.Format_GuidInvalidChar => SR.Format_GuidInvalidChar, 227ParseFailure.Format_GuidInvLen => SR.Format_GuidInvLen, 228_ => SR.Format_GuidUnrecognized 331_ => throw new FormatException(SR.Format_InvalidGuidFormatSpecification), 963throw new ArgumentException(SR.Arg_MustBeGuid, nameof(value)); 1757throw new FormatException(SR.Format_InvalidGuidFormatSpecification);
src\libraries\System.Private.CoreLib\src\System\Half.cs (2)
434return (obj is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeHalf); 1744throw new ArithmeticException(SR.Arithmetic_NaN);
src\libraries\System.Private.CoreLib\src\System\HashCode.cs (2)
499public override int GetHashCode() => throw new NotSupportedException(SR.HashCode_HashCodeNotSupported); 503public override bool Equals(object? obj) => throw new NotSupportedException(SR.HashCode_EqualityNotSupported);
src\libraries\System.Private.CoreLib\src\System\Index.cs (1)
149throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_NeedNonNegNum);
src\libraries\System.Private.CoreLib\src\System\IndexOutOfRangeException.cs (3)
17: base(SR.Arg_IndexOutOfRangeException) 23: base(message ?? SR.Arg_IndexOutOfRangeException) 29: base(message ?? SR.Arg_IndexOutOfRangeException, innerException)
src\libraries\System.Private.CoreLib\src\System\InsufficientExecutionStackException.cs (3)
14: base(SR.Arg_InsufficientExecutionStackException) 20: base(message ?? SR.Arg_InsufficientExecutionStackException) 26: base(message ?? SR.Arg_InsufficientExecutionStackException, innerException)
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
61throw new ArgumentException(SR.Arg_MustBeInt128);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (4)
68throw new ArgumentException(SR.Arg_MustBeInt16); 252throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int16", "DateTime")); 1413static string IBinaryIntegerParseAndFormatInfo<short>.OverflowMessage => SR.Overflow_Int16;
src\libraries\System.Private.CoreLib\src\System\Int32.cs (4)
75throw new ArgumentException(SR.Arg_MustBeInt32); 261throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int32", "DateTime")); 1449static string IBinaryIntegerParseAndFormatInfo<int>.OverflowMessage => SR.Overflow_Int32;
src\libraries\System.Private.CoreLib\src\System\Int64.cs (4)
72throw new ArgumentException(SR.Arg_MustBeInt64); 258throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Int64", "DateTime")); 1452static string IBinaryIntegerParseAndFormatInfo<long>.OverflowMessage => SR.Overflow_Int64;
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
193throw new ArgumentException(SR.Arg_MustBeIntPtr);
src\libraries\System.Private.CoreLib\src\System\InvalidCastException.cs (4)
18: base(SR.Arg_InvalidCastException) 24: base(message ?? SR.Arg_InvalidCastException) 30: base(message ?? SR.Arg_InvalidCastException, innerException) 36: base(message ?? SR.Arg_InvalidCastException)
src\libraries\System.Private.CoreLib\src\System\InvalidOperationException.cs (3)
18: base(SR.Arg_InvalidOperationException) 24: base(message ?? SR.Arg_InvalidOperationException) 30: base(message ?? SR.Arg_InvalidOperationException, innerException)
src\libraries\System.Private.CoreLib\src\System\InvalidProgramException.cs (3)
18: base(SR.InvalidProgram_Default) 24: base(message ?? SR.InvalidProgram_Default) 30: base(message ?? SR.InvalidProgram_Default, inner)
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (8)
46throw new ArgumentException(SR.Argument_StreamNotReadable); 239throw new IOException(SR.Arg_DecBitCtor, e); 251throw new IOException(SR.Format(SR.IO_InvalidStringLen_Len, stringLength)); 302throw new ArgumentException(SR.Argument_InvalidOffLen); 421throw new ArgumentException(SR.Argument_InvalidOffLen); 553throw new FormatException(SR.Format_Bad7BitInt); 593throw new FormatException(SR.Format_Bad7BitInt);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (3)
51throw new ArgumentException(SR.Argument_StreamNotWritable); 181throw new ArgumentException(SR.Arg_SurrogatesNotAllowedAsSingleChar); 236throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexCount);
src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (3)
72throw new ArgumentOutOfRangeException(nameof(bufferSize), SR.Format(SR.ArgumentOutOfRange_MustBePositive, nameof(bufferSize))); 399throw new NotSupportedException(SR.NotSupported_CannotWriteToBufferedStreamIfReadBufferCannotBeFlushed);
src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (1)
75throw new ArgumentException(SR.Argument_DirectorySeparatorInvalid, paramName);
src\libraries\System.Private.CoreLib\src\System\IO\Directory.Unix.cs (1)
17throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(unixCreateMode));
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (5)
79throw new ArgumentException(SR.Argument_PathEmpty, nameof(path)); 81throw new ArgumentException(SR.Arg_Path2IsRooted, nameof(path)); 98throw new ArgumentException(SR.Format(SR.Argument_InvalidSubPath, path, FullPath), nameof(path)); 199_ => throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(searchTarget)),
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryNotFoundException.cs (3)
21: base(SR.Arg_DirectoryNotFoundException) 27: base(message ?? SR.Arg_DirectoryNotFoundException) 33: base(message ?? SR.Arg_DirectoryNotFoundException, innerException)
src\libraries\System.Private.CoreLib\src\System\IO\EndOfStreamException.cs (3)
15: base(SR.Arg_EndOfStreamException) 21: base(message ?? SR.Arg_EndOfStreamException) 27: base(message ?? SR.Arg_EndOfStreamException, innerException)
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (3)
30throw new ArgumentException(SR.Arg_Path2IsRooted, nameof(expression)); 33throw new ArgumentException(SR.Argument_NullCharInPath, expression); 36throw new ArgumentException(SR.Argument_NullCharInPath, directory);
src\libraries\System.Private.CoreLib\src\System\IO\EnumerationOptions.cs (1)
45throw new ArgumentOutOfRangeException(nameof(searchOption), SR.ArgumentOutOfRange_Enum);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (4)
651throw new IOException(SR.IO_FileTooLong2GB); 887throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, fullSourceFileName), fullSourceFileName); 989return Task.FromException<byte[]>(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(SR.IO_FileTooLong2GB)));
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (6)
40throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, FullPath), FullPath); 164throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, FullName)); 167throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, FullName), FullName);
src\libraries\System.Private.CoreLib\src\System\IO\FileLoadException.cs (3)
15: base(SR.IO_FileLoad) 55s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileNotFoundException.cs (4)
17: base(SR.IO_FileNotFound) 64_message = SR.IO_FileNotFound; 78s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (2)
238throw new ArgumentException(SR.Arg_InvalidFileAttrs, "Attributes"); 481throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixFileMode));
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (7)
71throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 75throw new ArgumentOutOfRangeException(nameof(access), SR.ArgumentOutOfRange_Enum); 188throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(options)); 194throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, options.Mode, options.Access), nameof(options)); 208throw new ArgumentException(SR.Argument_InvalidUnixCreateMode, nameof(options)); 597throw new ArgumentException(SR.Argument_InvalidSeekOrigin, nameof(origin));
src\libraries\System.Private.CoreLib\src\System\IO\FileStreamOptions.cs (2)
139throw new PlatformNotSupportedException(SR.PlatformNotSupported_UnixFileMode); 144throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixCreateMode));
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.cs (2)
27throw new ArgumentException(SR.Argument_NullCharInPath, argName); 43throw new IOException(SR.IO_SourceDestMustBeDifferent);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (29)
59return new IOException(SR.Format(SR.Arg_FileIsDirectory_Name, path)); 68throw new PlatformNotSupportedException(SR.PlatformNotSupported_FileEncryption); 73throw new PlatformNotSupportedException(SR.PlatformNotSupported_FileEncryption); 133throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, sourceFullPath)); 142throw new UnauthorizedAccessException(SR.Format(SR.IO_NotAFile, destFullPath)); 148throw new IOException(SR.Format(SR.IO_CannotReplaceSameFile, sourceFullPath, destFullPath)); 411throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 423throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 436throw new IOException(SR.IO_SourceDestMustBeDifferent); 443throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 447throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, destFullPath)); 457throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, sourceFullPath), errorInfo.RawErrno); 459throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 461throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 567throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath)); 706throw new IOException(SR.Format(SR.IO_TooManySymbolicLinkLevels, linkPath));
src\libraries\System.Private.CoreLib\src\System\IO\InvalidDataException.cs (3)
18: base(SR.GenericInvalidData) 26: base(message ?? SR.GenericInvalidData) 36: base(message ?? SR.GenericInvalidData, innerException)
src\libraries\System.Private.CoreLib\src\System\IO\IOException.cs (1)
15: base(SR.Arg_IOException)
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (13)
88throw new ArgumentException(SR.Argument_InvalidOffLen); 133throw new IOException(SR.IO_StreamTooLong); 182throw new UnauthorizedAccessException(SR.UnauthorizedAccess_MemStreamBuffer); 264throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity); 269throw new NotSupportedException(SR.NotSupported_MemStreamNotExpandable); 314throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_StreamLength); 520_ => throw new ArgumentException(SR.Argument_InvalidSeekOrigin) 527throw new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_StreamLength); 530throw new IOException(SR.IO_SeekBeforeBegin); 550throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_StreamLength); 557throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_StreamLength); 587throw new IOException(SR.IO_StreamTooLong); 638throw new IOException(SR.IO_StreamTooLong);
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (2)
867throw new ArgumentException(SR.Arg_PathEmpty, nameof(relativeTo)); 869throw new ArgumentException(SR.Arg_PathEmpty, nameof(path));
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (3)
31throw new ArgumentException(SR.Argument_NullCharInPath, nameof(path)); 42throw new ArgumentException(SR.Arg_BasePathNotFullyQualified, nameof(basePath)); 45throw new ArgumentException(SR.Argument_NullCharInPath);
src\libraries\System.Private.CoreLib\src\System\IO\PathTooLongException.cs (3)
15: base(SR.IO_PathTooLong) 21: base(message ?? SR.IO_PathTooLong) 27: base(message ?? SR.IO_PathTooLong, innerException)
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
38throw new InvalidOperationException(SR.PersistedFiles_NoHomeDirectory);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (7)
82throw new ArgumentOutOfRangeException(badArg, SR.ArgumentOutOfRange_Enum); 88throw new ArgumentOutOfRangeException(nameof(options), SR.ArgumentOutOfRange_Enum); 105throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, mode, access), nameof(access)); 111throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(access)); 127throw new ArgumentException(SR.Argument_InvalidPreallocateAccess, nameof(access)); 135throw new ArgumentException(SR.Argument_InvalidPreallocateMode, nameof(mode));
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.Unix.cs (2)
63throw new PlatformNotSupportedException(SR.PlatformNotSupported_OSXFileLocking); 73throw new PlatformNotSupportedException(SR.PlatformNotSupported_OSXFileLocking);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\OSFileStreamStrategy.cs (3)
91internal sealed override string Name => _fileHandle.Path ?? SR.IO_UnknownFileName; 169throw new IOException(SR.IO_SeekAppendOverwrite); 182throw new IOException(SR.IO_SetLengthAppendTruncate);
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (5)
39get => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported); 40set => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported); 45get => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported); 46set => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported); 796throw new IOException(SR.IO_StreamTooLong);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (8)
90throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress); 148throw new ArgumentException(SR.Argument_StreamNotReadable); 222throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(options)); 356throw new ArgumentException(SR.Argument_InvalidOffLen); 435throw new ArgumentException(SR.Argument_InvalidOffLen); 1057throw new ArgumentException(SR.Argument_InvalidOffLen); 1268throw new ArgumentException(SR.Argument_InvalidOffLen); 1407void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_ReaderClosed);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (7)
62throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress); 104throw new ArgumentException(SR.Argument_StreamNotWritable); 179throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(options)); 379throw new ArgumentException(SR.Argument_InvalidOffLen); 739throw new ArgumentException(SR.Argument_InvalidOffLen); 891throw new ArgumentException(SR.Argument_InvalidOffLen); 1018void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_WriterClosed);
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (4)
94throw new ArgumentException(SR.Argument_InvalidOffLen); 295throw new ArgumentException(SR.Argument_InvalidOffLen); 313throw new ArgumentException(SR.Argument_InvalidOffLen); 327throw new ObjectDisposedException(null, SR.ObjectDisposed_ReaderClosed);
src\libraries\System.Private.CoreLib\src\System\IO\StringWriter.cs (10)
77throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 96throw new ArgumentException(SR.Argument_InvalidOffLen); 100throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 118throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 131throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 152throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 170throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 189throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 243throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed); 278throw new ObjectDisposedException(null, SR.ObjectDisposed_WriterClosed);
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (7)
78throw new ArgumentException(SR.Argument_InvalidOffLen); 105throw new IOException(SR.IO_InvalidReadLength); 155throw new IOException(SR.IO_InvalidReadLength); 268throw new ArgumentException(SR.Argument_InvalidOffLen); 298throw new ArgumentException(SR.Argument_InvalidOffLen); 397throw new ArgumentException(SR.Argument_InvalidOffLen); 410throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (1)
152throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (28)
48throw new ArgumentException(SR.Argument_OffsetAndCapacityOutOfBounds); 57throw new InvalidOperationException(SR.InvalidOperation_CalledTwice); 69throw new ArgumentException(SR.Argument_UnmanagedMemAccessorWrapAround); 249throw new ArgumentException(SR.Arg_BadDecimal); // Throw same Exception type as Decimal(int[]) ctor for compat 287throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed); 291throw new NotSupportedException(SR.NotSupported_Reading); 299throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired); 303throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 321throw new ArgumentException(SR.Argument_InvalidOffLen); 325throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed); 329throw new NotSupportedException(SR.NotSupported_Reading); 338throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired); 515throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed); 519throw new NotSupportedException(SR.NotSupported_Writing); 527throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired); 531throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position)); 547throw new ArgumentException(SR.Argument_InvalidOffLen); 552throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired); 557throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed); 561throw new NotSupportedException(SR.NotSupported_Writing); 571throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed); 575throw new NotSupportedException(SR.NotSupported_Reading); 582throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired); 586throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 595throw new ObjectDisposedException(nameof(UnmanagedMemoryAccessor), SR.ObjectDisposed_ViewAccessorClosed); 599throw new NotSupportedException(SR.NotSupported_Writing); 606throw new ArgumentOutOfRangeException(nameof(position), SR.ArgumentOutOfRange_PositionLessThanCapacityRequired); 610throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position));
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (23)
88throw new ArgumentException(SR.Argument_InvalidSafeBufferOffLen); 97throw new InvalidOperationException(SR.InvalidOperation_CalledTwice); 109throw new ArgumentException(SR.ArgumentOutOfRange_UnmanagedMemStreamWrapAround); 158throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_LengthGreaterThanCapacity); 161throw new ArgumentOutOfRangeException(nameof(capacity), SR.ArgumentOutOfRange_UnmanagedMemStreamWrapAround); 163throw new ArgumentOutOfRangeException(nameof(access), SR.ArgumentOutOfRange_Enum); 165throw new InvalidOperationException(SR.InvalidOperation_CalledTwice); 301throw new NotSupportedException(SR.NotSupported_UmsSafeBuffer); 308throw new IndexOutOfRangeException(SR.IndexOutOfRange_UMSPosition); 314throw new NotSupportedException(SR.NotSupported_UmsSafeBuffer); 319throw new IOException(SR.IO_SeekBeforeBegin); 322throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_UnmanagedMemStreamLength); 542throw new IOException(SR.IO_SeekBeforeBegin); 548throw new IOException(SR.IO_SeekBeforeBegin); 554throw new IOException(SR.IO_SeekBeforeBegin); 558throw new ArgumentException(SR.Argument_InvalidSeekOrigin); 573throw new NotSupportedException(SR.NotSupported_UmsSafeBuffer); 579throw new IOException(SR.IO_FixedCapacity); 636throw new IOException(SR.IO_StreamTooLong); 641throw new NotSupportedException(SR.IO_FixedCapacity); 665throw new ArgumentException(SR.Arg_BufferTooSmall); 765throw new IOException(SR.IO_StreamTooLong); 768throw new NotSupportedException(SR.IO_FixedCapacity);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStreamWrapper.cs (2)
47throw new UnauthorizedAccessException(SR.UnauthorizedAccess_MemStreamBuffer); 59set => throw new IOException(SR.IO_FixedCapacity);
src\libraries\System.Private.CoreLib\src\System\Lazy.cs (4)
151throw new ArgumentOutOfRangeException(nameof(mode), SR.Lazy_ctor_ModeInvalid); 163throw new MissingMemberException(SR.Lazy_CreateValue_NoParameterlessCtorForT); 320throw new InvalidOperationException(SR.Lazy_Value_RecursiveCallsToValue); 448SR.Lazy_ToString_ValueNotCreated;
src\libraries\System.Private.CoreLib\src\System\MarshalByRefObject.cs (2)
19throw new PlatformNotSupportedException(SR.PlatformNotSupported_Remoting); 25throw new PlatformNotSupportedException(SR.PlatformNotSupported_Remoting);
src\libraries\System.Private.CoreLib\src\System\Math.cs (5)
151throw new OverflowException(SR.Overflow_NegateTwosCompNum); 1374throw new ArithmeticException(SR.Arithmetic_NaN); 1424throw new ArithmeticException(SR.Arithmetic_NaN); 1443throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max));
src\libraries\System.Private.CoreLib\src\System\MemberAccessException.cs (3)
26: base(SR.Arg_AccessException) 36: base(message ?? SR.Arg_AccessException) 42: base(message ?? SR.Arg_AccessException, inner)
src\libraries\System.Private.CoreLib\src\System\MethodAccessException.cs (3)
18: base(SR.Arg_MethodAccessException) 24: base(message ?? SR.Arg_MethodAccessException) 30: base(message ?? SR.Arg_MethodAccessException, inner)
src\libraries\System.Private.CoreLib\src\System\MissingFieldException.cs (5)
15: base(SR.Arg_MissingFieldException) 21: base(message ?? SR.Arg_MissingFieldException) 27: base(message ?? SR.Arg_MissingFieldException, inner) 57return SR.Format(SR.MissingField_Name, ClassName, MemberName);
src\libraries\System.Private.CoreLib\src\System\MissingMemberException.cs (5)
15: base(SR.Arg_MissingMemberException) 21: base(message ?? SR.Arg_MissingMemberException) 27: base(message ?? SR.Arg_MissingMemberException, inner) 70return SR.Format(SR.MissingMember_Name, ClassName, MemberName);
src\libraries\System.Private.CoreLib\src\System\MissingMethodException.cs (5)
18: base(SR.Arg_MissingMethodException) 24: base(message ?? SR.Arg_MissingMethodException) 30: base(message ?? SR.Arg_MissingMethodException, inner) 52SR.Format(SR.MissingMethod_Name, ClassName, MemberName);
src\libraries\System.Private.CoreLib\src\System\MulticastNotSupportedException.cs (3)
19: base(SR.Arg_MulticastNotSupportedException) 25: base(message ?? SR.Arg_MulticastNotSupportedException) 31: base(message ?? SR.Arg_MulticastNotSupportedException, inner)
src\libraries\System.Private.CoreLib\src\System\NotFiniteNumberException.cs (5)
17: base(SR.Arg_NotFiniteNumberException) 30: base(message ?? SR.Arg_NotFiniteNumberException) 37: base(message ?? SR.Arg_NotFiniteNumberException) 44: base(message ?? SR.Arg_NotFiniteNumberException, innerException) 50: base(message ?? SR.Arg_NotFiniteNumberException, innerException)
src\libraries\System.Private.CoreLib\src\System\NotImplementedException.cs (3)
18: base(SR.Arg_NotImplementedException) 23: base(message ?? SR.Arg_NotImplementedException) 28: base(message ?? SR.Arg_NotImplementedException, inner)
src\libraries\System.Private.CoreLib\src\System\NotSupportedException.cs (3)
19: base(SR.Arg_NotSupportedException) 25: base(message ?? SR.Arg_NotSupportedException) 31: base(message ?? SR.Arg_NotSupportedException, innerException)
src\libraries\System.Private.CoreLib\src\System\NullReferenceException.cs (3)
18: base(SR.Arg_NullReferenceException) 24: base(message ?? SR.Arg_NullReferenceException) 30: base(message ?? SR.Arg_NullReferenceException, innerException)
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (6)
718ThrowOverflowException(SR.Overflow_Decimal); 1046SR.Format(SR.Format_InvalidStringWithValue, Encoding.UTF8.GetString(bytes)) : 1047SR.Format_InvalidString; 1051errorMessage = SR.Format(SR.Format_InvalidStringWithValue, value.ToString());
src\libraries\System.Private.CoreLib\src\System\Numerics\INumber.cs (1)
170ThrowHelper.ThrowArithmeticException(SR.Arithmetic_NaN);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector_1.cs (1)
230return IsSupported ? ToString() : SR.NotSupported_Type;
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (6)
23this(null, SR.ObjectDisposed_Generic) 28this(objectName, SR.ObjectDisposed_Generic) 32public ObjectDisposedException(string? objectName, string? message) : base(message ?? SR.ObjectDisposed_Generic) 39: base(message ?? SR.ObjectDisposed_Generic, innerException) 99string objectDisposed = SR.Format(SR.ObjectDisposed_ObjectName_Name, name);
src\libraries\System.Private.CoreLib\src\System\OperatingSystem.cs (2)
59throw new ArgumentOutOfRangeException(nameof(platform), platform, SR.Format(SR.Arg_EnumIllegalVal, platform));
src\libraries\System.Private.CoreLib\src\System\OperationCanceledException.cs (3)
28: base(SR.OperationCanceled) 34: base(message ?? SR.OperationCanceled) 40: base(message ?? SR.OperationCanceled, innerException)
src\libraries\System.Private.CoreLib\src\System\OverflowException.cs (3)
18: base(SR.Arg_OverflowException) 24: base(message ?? SR.Arg_OverflowException) 30: base(message ?? SR.Arg_OverflowException, innerException)
src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (14)
33throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix)); 38throw new ArgumentOutOfRangeException(SR.ArgumentOutOfRange_IndexMustBeLess); 45throw new FormatException(SR.Format_EmptyInputString); 53throw new ArgumentException(SR.Arg_CannotHaveNegativeValue); 56throw new OverflowException(SR.Overflow_NegativeUnsigned); 80throw new FormatException(SR.Format_NoParsibleDigits); 86throw new FormatException(SR.Format_ExtraJunkAtEnd); 121throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix)); 126throw new ArgumentOutOfRangeException(SR.ArgumentOutOfRange_IndexMustBeLess); 133throw new FormatException(SR.Format_EmptyInputString); 141throw new ArgumentException(SR.Arg_CannotHaveNegativeValue); 144throw new OverflowException(SR.Overflow_NegativeUnsigned); 169throw new FormatException(SR.Format_NoParsibleDigits); 175throw new FormatException(SR.Format_ExtraJunkAtEnd);
src\libraries\System.Private.CoreLib\src\System\PlatformNotSupportedException.cs (3)
18: base(SR.Arg_PlatformNotSupported) 24: base(message ?? SR.Arg_PlatformNotSupported) 30: base(message ?? SR.Arg_PlatformNotSupported, inner)
src\libraries\System.Private.CoreLib\src\System\Random.cs (3)
197throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 338throw new ArgumentOutOfRangeException("minValue", SR.Format(SR.Argument_MinMaxValue, "minValue", "maxValue"));
src\libraries\System.Private.CoreLib\src\System\RankException.cs (3)
18: base(SR.Arg_RankException) 24: base(message ?? SR.Arg_RankException) 30: base(message ?? SR.Arg_RankException, innerException)
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (2)
190throw new NotSupportedException(SR.NotSupported_CannotCallEqualsOnSpan); 201throw new NotSupportedException(SR.NotSupported_CannotCallGetHashCodeOnSpan);
src\libraries\System.Private.CoreLib\src\System\Reflection\AmbiguousMatchException.cs (3)
14: base(SR.Arg_AmbiguousMatchException_NoMessage) 20: base(message ?? SR.Arg_AmbiguousMatchException_NoMessage) 26: base(message ?? SR.Arg_AmbiguousMatchException_NoMessage, inner)
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (11)
37throw new NotSupportedException(SR.Format(SR.NotSupported_NoTypeInfo, types[i].FullName)); 243throw new BadImageFormatException(SR.BadImageFormat_BadILFormat); 259throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, path), nameof(path)); 273throw new FileNotFoundException(SR.Format(SR.FileNotFound_LoadFile, normalizedPath), normalizedPath); 391throw new NotSupportedException(SR.NotSupported_AssemblyLoadFromHash); 404public static Assembly ReflectionOnlyLoad(byte[] rawAssembly) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } 407public static Assembly ReflectionOnlyLoad(string assemblyString) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); } 410public static Assembly ReflectionOnlyLoadFrom(string assemblyFile) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly); }
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyName.cs (5)
34throw new ArgumentException(SR.Format_StringZeroLength); 256get => throw new PlatformNotSupportedException(SR.PlatformNotSupported_StrongNameSigning); 257set => throw new PlatformNotSupportedException(SR.PlatformNotSupported_StrongNameSigning); 363throw new FormatException(SR.Arg_FormatException); 379throw new FormatException(SR.Arg_FormatException);
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyNameHelpers.StrongName.cs (1)
20throw new SecurityException(SR.Security_InvalidAssemblyPublicKey);
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
55throw new ArgumentException(SR.Argument_MustBeRuntimeConstructorInfo, nameof(constructor));
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeFormatException.cs (2)
15: this(SR.Arg_CustomAttributeFormatException) 25: base(message ?? SR.Arg_CustomAttributeFormatException, inner)
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs (1)
24_ => throw new ArgumentException(SR.Argument_InvalidMemberForNamedArgument)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (9)
57public override string? CodeBase => throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 64throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 68throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 72throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 75throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 78throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 81throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 84throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 123throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionEmit);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (8)
228throw new NotSupportedException(SR.NotSupported_DynamicMethodFlags); 237throw new ArgumentException(SR.Arg_InvalidTypeInSignature); 240throw new ArgumentException(SR.Arg_InvalidTypeInSignature); 251(returnType.UnderlyingSystemType as RuntimeType) ?? throw new NotSupportedException(SR.Arg_InvalidTypeInRetType); 273throw new ArgumentException(SR.Argument_InvalidTypeForDynamicMethod); 324public override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.InvalidOperation_NotAllowedInDynamicMethod); 351throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 388throw new ArgumentOutOfRangeException(SR.ArgumentOutOfRange_ParamSequence);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (7)
96throw new ArgumentException(SR.Argument_NotExceptionType, nameof(excType)); 101throw new ArgumentException(SR.Arg_NoDefCTorWithoutTypeName, nameof(excType)); 134throw new ArgumentException(SR.NotSupported_OutputStreamUsingTypeBuilder); 140throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(localBuilder)); 171throw new NotSupportedException(SR.NotSupported_OutputStreamUsingTypeBuilder); 177throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(fld)); 262throw new NotSupportedException(SR.NotSupported_EmitDebugInfo);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\LocalBuilder.cs (1)
36protected virtual void SetLocalSymInfoCore(string name) => throw new NotSupportedException(SR.NotSupported_EmitDebugInfo);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (1)
27throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (3)
56public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule); 91throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (2)
110throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (1)
66throw new InvalidOperationException(SR.InvalidOperation_NotADebugModule);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (29)
76throw new ArgumentException(SR.Argument_BadSigFormat); 137throw new ArgumentException(SR.Argument_BadSigFormat); 167throw new ArgumentException(SR.Argument_BadSigFormat); 185throw new ArgumentException(SR.Argument_BadSigFormat); 301throw new ArgumentException(SR.Argument_HasToBeArrayClass); 306public override Guid GUID => throw new NotSupportedException(SR.NotSupported_NonReflectedType); 312throw new NotSupportedException(SR.NotSupported_NonReflectedType); 338public override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(SR.NotSupported_NonReflectedType); 371throw new NotSupportedException(SR.NotSupported_NonReflectedType); 377throw new NotSupportedException(SR.NotSupported_NonReflectedType); 384throw new NotSupportedException(SR.NotSupported_NonReflectedType); 390throw new NotSupportedException(SR.NotSupported_NonReflectedType); 396throw new NotSupportedException(SR.NotSupported_NonReflectedType); 402throw new NotSupportedException(SR.NotSupported_NonReflectedType); 409throw new NotSupportedException(SR.NotSupported_NonReflectedType); 415throw new NotSupportedException(SR.NotSupported_NonReflectedType); 421throw new NotSupportedException(SR.NotSupported_NonReflectedType); 427throw new NotSupportedException(SR.NotSupported_NonReflectedType); 434throw new NotSupportedException(SR.NotSupported_NonReflectedType); 440throw new NotSupportedException(SR.NotSupported_NonReflectedType); 446throw new NotSupportedException(SR.NotSupported_NonReflectedType); 452throw new NotSupportedException(SR.NotSupported_NonReflectedType); 458throw new NotSupportedException(SR.NotSupported_NonReflectedType); 464throw new NotSupportedException(SR.NotSupported_NonReflectedType); 476throw new NotSupportedException(SR.NotSupported_NonReflectedType); 482throw new NotSupportedException(SR.NotSupported_NonReflectedType); 539throw new NotSupportedException(SR.NotSupported_NonReflectedType); 544throw new NotSupportedException(SR.NotSupported_NonReflectedType); 549throw new NotSupportedException(SR.NotSupported_NonReflectedType);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (18)
90throw new ArgumentException(SR.Arg_EmptyArray, nameof(names)); 128throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeOptionalCustomModifiers), nameof(parameterTypes))); 131throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeRequiredCustomModifiers), nameof(parameterTypes))); 331throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 343throw new ArgumentException(SR.Argument_NeedGenericMethodDefinition, nameof(method)); 348throw new ArgumentException(SR.Argument_MethodNeedGenericDeclaringType, nameof(method)); 353throw new ArgumentException(SR.Argument_InvalidMethodDeclaringType, nameof(type)); 366throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 378throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 383throw new ArgumentException(SR.Argument_ConstructorNeedGenericDeclaringType, nameof(constructor)); 388throw new ArgumentException(SR.Argument_InvalidConstructorDeclaringType, nameof(type)); 399throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 411throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 416throw new ArgumentException(SR.Argument_FieldNeedGenericDeclaringType, nameof(field)); 421throw new ArgumentException(SR.Argument_InvalidFieldDeclaringType, nameof(type)); 432throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (2)
255public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\libraries\System.Private.CoreLib\src\System\Reflection\EventInfo.cs (2)
67throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod); 79throw new InvalidOperationException(SR.InvalidOperation_NoPublicRemoveMethod);
src\libraries\System.Private.CoreLib\src\System\Reflection\ExceptionHandlingClause.cs (1)
16public virtual int FilterOffset => throw new InvalidOperationException(SR.Arg_EHClauseNotFilter);
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (7)
192throw new InvalidOperationException(SR.Arg_UnboundGenField); 308throw new InvalidOperationException(SR.Arg_UnboundGenField); 478private static void ThrowHelperTargetException() => throw new TargetException(SR.RFLCT_Targ_StatFldReqTarg); 481throw new ArgumentException(SR.Format(SR.Arg_FieldDeclTarget, fieldInfo.Name, fieldInfo.DeclaringType, target.GetType())); 484throw new FieldAccessException(SR.Format(SR.RFLCT_CannotSetInitonlyStaticField, fieldInfo.Name, fieldInfo.DeclaringType));
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldInfo.cs (3)
72public virtual void SetValueDirect(TypedReference obj, object value) { throw new NotSupportedException(SR.NotSupported_AbstractNonCLS); } 74public virtual object? GetValueDirect(TypedReference obj) { throw new NotSupportedException(SR.NotSupported_AbstractNonCLS); } 76public virtual object? GetRawConstantValue() { throw new NotSupportedException(SR.NotSupported_AbstractNonCLS); }
src\libraries\System.Private.CoreLib\src\System\Reflection\InvalidFilterCriteriaException.cs (2)
15: this(SR.Arg_InvalidFilterCriteriaException) 25: base(message ?? SR.Arg_InvalidFilterCriteriaException, inner)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (1)
318throw new NullReferenceException(SR.NullReference_InvokeNullRefReturned);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (2)
51public virtual Type[] GetGenericArguments() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 146throw new ArgumentException(SR.Arg_VarMissNull, "parameters");
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (1)
42throw new TargetParameterCountException(SR.Arg_ParmCnt);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInfo.cs (5)
18public override Type[] GetGenericArguments() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 19public virtual MethodInfo GetGenericMethodDefinition() { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 23public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 29public virtual Delegate CreateDelegate(Type delegateType) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 30public virtual Delegate CreateDelegate(Type delegateType, object? target) { throw new NotSupportedException(SR.NotSupported_SubclassOverride); }
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (1)
77throw new ArgumentException(SR.Argument_MustBeRuntimeMethod, nameof(method));
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (3)
94throw new TargetException(SR.RFLCT_Targ_StatMethReqTarg); 99throw new TargetException(SR.Format(SR.RFLCT_Targ_ITargMismatch_WithType, method.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (27)
70public override bool Equals([NotNullWhen(true)] object? obj) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 71public override bool Equals(Type? other) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 72public override int GetHashCode() => throw new NotSupportedException(SR.NotSupported_ModifiedType); 85=> throw new NotSupportedException(SR.NotSupported_ModifiedType); 88public override int MetadataToken => throw new NotSupportedException(SR.NotSupported_ModifiedType); 91public override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(SR.NotSupported_ModifiedType); 96public override Type? BaseType => throw new NotSupportedException(SR.NotSupported_ModifiedType); 97public override Type? DeclaringType => throw new NotSupportedException(SR.NotSupported_ModifiedType); 98public override Type? ReflectedType => throw new NotSupportedException(SR.NotSupported_ModifiedType); 102CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 105public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 110=> throw new NotSupportedException(SR.NotSupported_ModifiedType); 113public override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 116public override FieldInfo? GetField(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 119public override FieldInfo[] GetFields(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 127public override Type? GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 130public override Type[] GetInterfaces() => throw new NotSupportedException(SR.NotSupported_ModifiedType); 134public override EventInfo? GetEvent(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 137public override EventInfo[] GetEvents() => throw new NotSupportedException(SR.NotSupported_ModifiedType); 142=> throw new NotSupportedException(SR.NotSupported_ModifiedType); 145public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 148public override EventInfo[] GetEvents(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 151public override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 154public override Type? GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 157public override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 160public override MemberInfo[] GetMembers(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_ModifiedType); 162public override MemberInfo GetMemberWithSameMetadataDefinitionAs(MemberInfo member) => throw new NotSupportedException(SR.NotSupported_ModifiedType);
src\libraries\System.Private.CoreLib\src\System\Reflection\Module.cs (1)
184throw new InvalidFilterCriteriaException(SR.InvalidFilterCriteriaException_CritString);
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (1)
278throw new InvalidOperationException(SR.NullabilityInfoContext_NotSupported);
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterInfo.cs (5)
66throw new SerializationException(SR.Serialization_InsufficientState); 78throw new SerializationException(SR.Serialization_BadParameterInfo); 87throw new SerializationException(SR.Serialization_BadParameterInfo); 96throw new SerializationException(SR.Serialization_BadParameterInfo); 99throw new SerializationException(SR.Serialization_NoParameterInfo);
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterModifier.cs (1)
13throw new ArgumentException(SR.Arg_ParmArraySize);
src\libraries\System.Private.CoreLib\src\System\Reflection\Pointer.cs (3)
28throw new ArgumentException(SR.Arg_MustBePointer, nameof(ptr)); 30throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 38throw new ArgumentException(SR.Arg_MustBePointer, nameof(ptr));
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeConstructorInfo.cs (8)
57SR.Format(SR.Acc_CreateInterfaceEx, declaringType)); 62SR.Format(SR.Acc_CreateAbstEx, declaringType)); 76SR.Format(SR.Acc_CreateGenericEx, declaringType)); 81throw new MemberAccessException(SR.Access_Void); 91throw new MemberAccessException(SR.Acc_NotClassInit);
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs (3)
76throw new InvalidOperationException(SR.Arg_UnboundGenParam); 87throw new NotSupportedException(SR.NotSupported_ByRefToByRefLikeReturn); 89throw new NotSupportedException(SR.NotSupported_ByRefToVoidReturn);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureByRefType.cs (1)
20public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (2)
54public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); 58public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (2)
31public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); 32public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureHasElementType.cs (2)
33public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 36public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignaturePointerType.cs (1)
20public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (64)
54public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SignatureType); // There is no SignatureType for type definition types so it would never be legal to call this. 81public sealed override Assembly Assembly => throw new NotSupportedException(SR.NotSupported_SignatureType); 82public sealed override Module Module => throw new NotSupportedException(SR.NotSupported_SignatureType); 84public sealed override Type ReflectedType => throw new NotSupportedException(SR.NotSupported_SignatureType); 85public sealed override Type BaseType => throw new NotSupportedException(SR.NotSupported_SignatureType); 88public sealed override Type[] GetInterfaces() => throw new NotSupportedException(SR.NotSupported_SignatureType); 89public sealed override bool IsAssignableFrom([NotNullWhen(true)] Type? c) => throw new NotSupportedException(SR.NotSupported_SignatureType); 90public sealed override int MetadataToken => throw new NotSupportedException(SR.NotSupported_SignatureType); 91public sealed override bool HasSameMetadataDefinitionAs(MemberInfo other) => throw new NotSupportedException(SR.NotSupported_SignatureType); 93public sealed override Type DeclaringType => throw new NotSupportedException(SR.NotSupported_SignatureType); 94public sealed override MethodBase DeclaringMethod => throw new NotSupportedException(SR.NotSupported_SignatureType); 96public sealed override Type[] GetGenericParameterConstraints() => throw new NotSupportedException(SR.NotSupported_SignatureType); 97public sealed override GenericParameterAttributes GenericParameterAttributes => throw new NotSupportedException(SR.NotSupported_SignatureType); 98public sealed override bool IsEnumDefined(object value) => throw new NotSupportedException(SR.NotSupported_SignatureType); 99public sealed override string GetEnumName(object value) => throw new NotSupportedException(SR.NotSupported_SignatureType); 100public sealed override string[] GetEnumNames() => throw new NotSupportedException(SR.NotSupported_SignatureType); 101public sealed override Type GetEnumUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SignatureType); 103public sealed override Array GetEnumValues() => throw new NotSupportedException(SR.NotSupported_SignatureType); 104public sealed override Guid GUID => throw new NotSupportedException(SR.NotSupported_SignatureType); 105protected sealed override TypeCode GetTypeCodeImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); 106protected sealed override TypeAttributes GetAttributeFlagsImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); 109public sealed override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 112public sealed override EventInfo GetEvent(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 115public sealed override EventInfo[] GetEvents(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 118public sealed override FieldInfo GetField(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 121public sealed override FieldInfo[] GetFields(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 124public sealed override MemberInfo[] GetMembers(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 127public sealed override MethodInfo[] GetMethods(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 130public sealed override Type GetNestedType(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 133public sealed override Type[] GetNestedTypes(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 136public sealed override PropertyInfo[] GetProperties(BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 139public sealed override object InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object?[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters) => throw new NotSupportedException(SR.NotSupported_SignatureType); 142protected sealed override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 145protected sealed override MethodInfo GetMethodImpl(string name, int genericParameterCount, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 148protected sealed override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 151public sealed override MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter? filter, object? filterCriteria) => throw new NotSupportedException(SR.NotSupported_SignatureType); 154public sealed override MemberInfo[] GetMember(string name, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 157public sealed override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SignatureType); 166public sealed override MemberInfo[] GetDefaultMembers() => throw new NotSupportedException(SR.NotSupported_SignatureType); 169public sealed override EventInfo[] GetEvents() => throw new NotSupportedException(SR.NotSupported_SignatureType); 171public sealed override object[] GetCustomAttributes(bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType); 172public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType); 173public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new NotSupportedException(SR.NotSupported_SignatureType); 174public sealed override IList<CustomAttributeData> GetCustomAttributesData() => throw new NotSupportedException(SR.NotSupported_SignatureType); 178public sealed override Type GetInterface(string name, bool ignoreCase) => throw new NotSupportedException(SR.NotSupported_SignatureType); 181protected sealed override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers) => throw new NotSupportedException(SR.NotSupported_SignatureType); 183protected sealed override bool IsCOMObjectImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); 184protected sealed override bool IsPrimitiveImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); 185public sealed override IEnumerable<CustomAttributeData> CustomAttributes => throw new NotSupportedException(SR.NotSupported_SignatureType); 188public sealed override Type[] FindInterfaces(TypeFilter filter, object? filterCriteria) => throw new NotSupportedException(SR.NotSupported_SignatureType); 189public sealed override InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => throw new NotSupportedException(SR.NotSupported_SignatureType); 190protected sealed override bool IsContextfulImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); 191public sealed override bool IsEnum => throw new NotSupportedException(SR.NotSupported_SignatureType); 192public sealed override bool IsEquivalentTo([NotNullWhen(true)] Type? other) => throw new NotSupportedException(SR.NotSupported_SignatureType); 193public sealed override bool IsInstanceOfType([NotNullWhen(true)] object? o) => throw new NotSupportedException(SR.NotSupported_SignatureType); 194protected sealed override bool IsMarshalByRefImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); 195public sealed override bool IsSecurityCritical => throw new NotSupportedException(SR.NotSupported_SignatureType); 196public sealed override bool IsSecuritySafeCritical => throw new NotSupportedException(SR.NotSupported_SignatureType); 197public sealed override bool IsSecurityTransparent => throw new NotSupportedException(SR.NotSupported_SignatureType); 199public sealed override bool IsSerializable => throw new NotSupportedException(SR.NotSupported_SignatureType); 200public sealed override bool IsSubclassOf(Type c) => throw new NotSupportedException(SR.NotSupported_SignatureType); 201protected sealed override bool IsValueTypeImpl() => throw new NotSupportedException(SR.NotSupported_SignatureType); 203public sealed override StructLayoutAttribute StructLayoutAttribute => throw new NotSupportedException(SR.NotSupported_SignatureType); 205public sealed override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(SR.NotSupported_SignatureType);
src\libraries\System.Private.CoreLib\src\System\Reflection\StrongNameKeyPair.cs (4)
14throw new PlatformNotSupportedException(SR.PlatformNotSupported_StrongNameSigning); 17throw new PlatformNotSupportedException(SR.PlatformNotSupported_StrongNameSigning); 25throw new PlatformNotSupportedException(SR.PlatformNotSupported_StrongNameSigning); 28throw new PlatformNotSupportedException(SR.PlatformNotSupported_StrongNameSigning);
src\libraries\System.Private.CoreLib\src\System\Reflection\TargetInvocationException.cs (2)
14: base(SR.Arg_TargetInvocationException, inner) 20: base(message ?? SR.Arg_TargetInvocationException, inner)
src\libraries\System.Private.CoreLib\src\System\Reflection\TargetParameterCountException.cs (3)
14: base(SR.Arg_TargetParameterCountException) 20: base(message ?? SR.Arg_TargetParameterCountException) 26: base(message ?? SR.Arg_TargetParameterCountException, inner)
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (3)
44throw new MissingManifestResourceException($"{SR.MissingManifestResource_NoNeutralDisk}{Environment.NewLineConst}baseName: {_mediator.BaseNameField} fileName: {_mediator.GetResourceFileName(culture)}"); 104throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (15)
140throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, fallbackLocation)); 158throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_Asm_Culture, a, attr.CultureName), e); 209throw new NotSupportedException(SR.Format(SR.NotSupported_ObsoleteResourcesFile, _mediator.MainAssembly.GetName().Name)); 233throw new NotSupportedException(SR.ResourceManager_ReflectionNotAllowed); 267throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e); 347throw new MissingManifestResourceException(SR.Format(SR.MissingManifestResource_MultipleBlobs, name, satellite.ToString())); 438throw new MissingSatelliteAssemblyException(SR.Format(SR.MissingSatelliteAssembly_Culture_Name, _mediator.NeutralResourcesCulture, satAssemName), missingCultureName); 480SR.Format(SR.MissingManifestResource_NoNeutralAsm,
src\libraries\System.Private.CoreLib\src\System\Resources\MissingManifestResourceException.cs (3)
16: base(SR.Arg_MissingManifestResourceException) 22: base(message ?? SR.Arg_MissingManifestResourceException) 28: base(message ?? SR.Arg_MissingManifestResourceException, inner)
src\libraries\System.Private.CoreLib\src\System\Resources\MissingSatelliteAssemblyException.cs (4)
20: base(SR.MissingSatelliteAssembly_Default) 26: base(message ?? SR.MissingSatelliteAssembly_Default) 32: base(message ?? SR.MissingSatelliteAssembly_Default) 39: base(message ?? SR.MissingSatelliteAssembly_Default, inner)
src\libraries\System.Private.CoreLib\src\System\Resources\NeutralResourcesLanguageAttribute.cs (2)
25throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, location));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (8)
192throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 208throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 214throw new ArgumentException(SR.Arg_ResMgrNotResSet, nameof(usingResourceSet)); 225throw new ArgumentException(SR.Argument_MustBeRuntimeType); 540throw new ArgumentException(SR.Format(SR.Arg_InvalidSatelliteContract_Asm_Ver, a, v)); 733throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotStream_Name, name));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (14)
52throw new NotSupportedException(SR.ResourceManager_ReflectionNotAllowed); 57throw new NotSupportedException(SR.NotSupported_ResourceObjectSerialization); 78throw new NotSupportedException(SR.BinaryFormatter_SerializationDisallowed); 88throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, graph.GetType().FullName)); 141throw new InvalidOperationException(SR.ResourceReaderIsClosed); 151throw new ArgumentException(SR.Format(SR.Arg_ResourceNameNotExist, resourceName)); 164throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, numBytesToSkip)); 171throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dPos)); 188throw new BadImageFormatException(SR.BadImageFormat_InvalidType); 197throw new FormatException(SR.BadImageFormat_ResourceNameCorrupted);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (68)
132throw new ArgumentException(SR.Argument_StreamNotReadable); 190throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 228throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r)); 241throw new InvalidOperationException(SR.ResourceReaderIsClosed); 324throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 345throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 354throw new BadImageFormatException(SR.BadImageFormat_ResourcesNameTooLong); 370throw new BadImageFormatException(SR.BadImageFormat_ResourceNameCorrupted); 393throw new BadImageFormatException(SR.BadImageFormat_NegativeStringLength); 399throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourcesIndexTooLong, index)); 422throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 436throw new EndOfStreamException(SR.Format(SR.BadImageFormat_ResourceNameCorrupted_NameIndex, index)); 442throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 463throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 489throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 502throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 551throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof); 555throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e); 633throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, eof); 637throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch, e); 710throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 717throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 724throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 738throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 750throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResourceDataLengthInvalid, len)); 764throw new BadImageFormatException(SR.BadImageFormat_TypeMismatch); 792throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, eof); 796throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted, e); 810throw new ArgumentException(SR.Resources_StreamNotValid); 819throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 834throw new NotSupportedException(SR.Format(SR.NotSupported_WrongResourceReader_Type, readerType)); 848throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version)); 854throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 862throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 904throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 925throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 936throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 952throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 961throw new BadImageFormatException(SR.BadImageFormat_ResourcesHeaderCorrupted); 972throw new NotSupportedException(SR.ResourceManager_ReflectionNotAllowed); 977throw new BadImageFormatException(SR.BadImageFormat_InvalidType); 1021throw new NotSupportedException(SR.NotSupported_ResourceObjectSerialization, fileNotFoundException); 1091if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1092if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1093if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1108if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1109if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1110if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1145if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1146if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1147if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1159if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (9)
128throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet); 145throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 156throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 169throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 209throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet); 220throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet);
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (2)
240throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet); 281throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet);
src\libraries\System.Private.CoreLib\src\System\Runtime\AmbiguousImplementationException.cs (3)
14: base(SR.Arg_AmbiguousImplementationException_NoMessage) 20: base(message ?? SR.Arg_AmbiguousImplementationException_NoMessage) 26: base(message ?? SR.Arg_AmbiguousImplementationException_NoMessage, innerException)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (1)
779throw new InvalidOperationException(SR.InvalidOperation_CollectionCorrupted);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ContractHelper.cs (21)
36throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind)); 104return hasConditionText ? SR.Format(SR.AssertionFailed_Cnd, conditionText) : SR.AssertionFailed; 107return hasConditionText ? SR.Format(SR.AssumptionFailed_Cnd, conditionText) : SR.AssumptionFailed; 110return hasConditionText ? SR.Format(SR.PreconditionFailed_Cnd, conditionText) : SR.PreconditionFailed; 113return hasConditionText ? SR.Format(SR.PostconditionFailed_Cnd, conditionText) : SR.PostconditionFailed; 116return hasConditionText ? SR.Format(SR.InvariantFailed_Cnd, conditionText) : SR.InvariantFailed; 119return hasConditionText ? SR.Format(SR.PostconditionOnExceptionFailed_Cnd, conditionText) : SR.PostconditionOnExceptionFailed; 123return SR.AssumptionFailed;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeWrappedException.cs (1)
21: base(SR.RuntimeWrappedException)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (6)
19: base(SR.Arg_SwitchExpressionException) { } 22base(SR.Arg_SwitchExpressionException, innerException) 38public SwitchExpressionException(string? message) : base(message ?? SR.Arg_SwitchExpressionException) { } 41: base(message ?? SR.Arg_SwitchExpressionException, innerException) { } 62string valueMessage = SR.Format(SR.SwitchExpressionException_UnmatchedValue, UnmatchedValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\GCSettings.cs (1)
46throw new InvalidOperationException(SR.InvalidOperation_SetLatencyModeNoGC);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ArrayWithOffset.cs (3)
25throw new ArgumentException(SR.ArgumentException_NotIsomorphic); 31throw new ArgumentException(SR.Argument_StructArrayTooLarge); 39throw new IndexOutOfRangeException(SR.IndexOutOfRange_ArrayWithOffset);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComEventsHelpers.NoCom.cs (2)
15throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 20throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\COMException.cs (4)
21: base(SR.Arg_COMException) 27: base(message ?? SR.Arg_COMException) 33: base(message ?? SR.Arg_COMException, inner) 39: base(message ?? SR.Arg_COMException)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CurrencyWrapper.cs (1)
21throw new ArgumentException(SR.Arg_MustBeDecimal, nameof(obj));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ErrorWrapper.cs (1)
20throw new ArgumentException(SR.Arg_MustBeInt32, nameof(errorCode));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ExternalException.cs (4)
18: base(SR.Arg_ExternalException) 24: base(message ?? SR.Arg_ExternalException) 30: base(message ?? SR.Arg_ExternalException, inner) 36: base(message ?? SR.Arg_ExternalException)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (3)
36throw new ArgumentOutOfRangeException(nameof(type), SR.ArgumentOutOfRange_Enum); 41throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value)); 97throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\InvalidComObjectException.cs (3)
20: base(SR.Arg_InvalidComObjectException) 26: base(message ?? SR.Arg_InvalidComObjectException) 32: base(message ?? SR.Arg_InvalidComObjectException, inner)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\InvalidOleVariantTypeException.cs (3)
19: base(SR.Arg_InvalidOleVariantTypeException) 25: base(message ?? SR.Arg_InvalidOleVariantTypeException) 31: base(message ?? SR.Arg_InvalidOleVariantTypeException, inner)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (14)
112throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 116throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 127throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T)); 571throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structureType)); 575throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structureType)); 619throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T)); 1057throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 1074throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type)); 1078throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 1100throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 1104throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 1112throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t)); 1125throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(TDelegate)); 1133throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(TDelegate));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.NoCom.cs (28)
27throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 34throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 44throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 52throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 58throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 64throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 70throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 77throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 84throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 90throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 96throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 102throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 108throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 115throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 122throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 128throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 134throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 141throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 148throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 155throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 162throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 168throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 174throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 181throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 190throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 196throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 216throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop); 222throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (1)
163throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MarshalDirectiveException.cs (3)
18: base(SR.Arg_MarshalDirectiveException) 24: base(message ?? SR.Arg_MarshalDirectiveException) 30: base(message ?? SR.Arg_MarshalDirectiveException, inner)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (11)
154throw new PlatformNotSupportedException(SR.ComVariant_SafeArray_PlatformNotSupported); 358throw new ArgumentException(SR.UnsupportedType, nameof(T)); 385throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_CreateRaw, nameof(vt)); 389throw new ArgumentException(SR.ComVariant_VT_VARIANT_In_Variant, nameof(vt)); 393throw new PlatformNotSupportedException(SR.ComVariant_SafeArray_PlatformNotSupported); 416_ => throw new ArgumentException(SR.Format(SR.ComVariant_SizeMustMatchVariantSize, nameof(T), nameof(vt))) 431throw new InvalidOperationException(SR.Format(SR.ComVariant_TypeIsNotSupportedType, VarType, string.Join(", ", requiredType))); 551throw new ArgumentException(SR.UnsupportedType, nameof(T)); 577throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_RawDataRef, nameof(T));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (4)
90throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 125throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 207throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 217throw new InvalidOperationException(SR.InvalidOperation_CannotRegisterSecondResolver);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
802throw new ArgumentException(SR.Arg_MustBeNFloat);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeArrayRankMismatchException.cs (3)
19: base(SR.Arg_SafeArrayRankMismatchException) 25: base(message ?? SR.Arg_SafeArrayRankMismatchException) 31: base(message ?? SR.Arg_SafeArrayRankMismatchException, inner)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeArrayTypeMismatchException.cs (3)
19: base(SR.Arg_SafeArrayTypeMismatchException) 25: base(message ?? SR.Arg_SafeArrayTypeMismatchException) 31: base(message ?? SR.Arg_SafeArrayTypeMismatchException, inner)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (7)
92throw new ArgumentOutOfRangeException(nameof(numBytes), SR.ArgumentOutOfRange_AddressSpace); 95throw new ArgumentOutOfRangeException(nameof(numBytes), SR.ArgumentOutOfRange_UIntPtrMax); 223throw new ArgumentException(SR.Argument_InvalidOffLen); 310throw new ArgumentException(SR.Argument_InvalidOffLen); 376throw new ArgumentException(SR.Arg_BufferTooSmall); 381return new InvalidOperationException(SR.InvalidOperation_MustCallInitialize); 406throw new ArgumentException(SR.Argument_NeedStructWithNoRefs);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128_1.cs (1)
135return IsSupported ? ToString() : SR.NotSupported_Type;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256_1.cs (1)
134return IsSupported ? ToString() : SR.NotSupported_Type;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512_1.cs (1)
134return IsSupported ? ToString() : SR.NotSupported_Type;
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64_1.cs (1)
141return IsSupported ? ToString() : SR.NotSupported_Type;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (4)
75throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, entryPointNotFoundException); 79throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, dllNotFoundException); 85throw new InvalidOperationException(SR.Format( 86SR.AssemblyDependencyResolver_FailedToResolveDependencies,
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (14)
340throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 358throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, nativeImagePath), nameof(nativeImagePath)); 363throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 388throw new BadImageFormatException(SR.BadImageFormat_BadILFormat); 424throw new BadImageFormatException(SR.BadImageFormat_BadILFormat); 444throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, unmanagedDllPath), nameof(unmanagedDllPath)); 463throw new InvalidOperationException(SR.AssemblyLoadContext_Unload_CannotUnloadIfNotCollectible); 495throw new InvalidOperationException(SR.AssemblyLoadContext_Verify_NotUnloading); 570throw new ArgumentException(SR.Arg_MustBeRuntimeAssembly, nameof(activating)); 666throw new InvalidOperationException(SR.Argument_CustomAssemblyLoadContextRequestedNameMismatch);
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (3)
155throw new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint_TooBig); 245InsufficientMemoryException e = new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint); 257InsufficientMemoryException e = new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint_VAFrag);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\OptionalFieldAttribute.cs (1)
18throw new ArgumentException(SR.Serialization_OptionalFieldVersionValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationException.cs (3)
18: base(SR.SerializationException) 24: base(message ?? SR.SerializationException) 30: base(message ?? SR.SerializationException, innerException)
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (4)
231throw new SerializationException(SR.Serialization_SameNameTwice); 307throw new SerializationException(SR.Format(SR.Serialization_NotFound, name)); 340throw new ArgumentException(SR.Argument_MustBeRuntimeType);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (2)
68throw new SerializationException(SR.Format(SR.Serialization_DangerousDeserialization_Switch, SwitchPrefix + switchSuffix));
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfoEnumerator.cs (4)
79throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 97throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 108throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 119throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (6)
120throw new ArgumentException(SR.Argument_FrameworkNameTooShort, nameof(frameworkName)); 131throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 148throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 173throw new ArgumentException(SR.Argument_FrameworkNameInvalidVersion, nameof(frameworkName), e); 188throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 194throw new ArgumentException(SR.Argument_FrameworkNameMissingVersion, nameof(frameworkName));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (11)
37throw new ArgumentException(SR.Format(SR.Argument_ResourceScopeWrongDirection, fromResType, toResType), nameof(from)); 42throw new ArgumentNullException(nameof(type), SR.ArgumentNull_TypeRequiredByResourceScope); 112throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, consumeAsScope), nameof(consumeAsScope)); 126throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, calleeScope), nameof(calleeScope)); 147throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, consumeAsScope), nameof(consumeAsScope)); 161throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, calleeScope), nameof(calleeScope));
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (36)
46throw new ArgumentException(SR.Argument_HasToBeArrayClass); 63throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 105throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 114throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 196throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 214throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this)); 225throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 229throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 247throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType), 320throw new InvalidOperationException(SR.Arg_GenericParameter); 324throw new ArgumentException(SR.Arg_NoAccessSpec, nameof(bindingFlags)); 341throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 346throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 399throw new ArgumentException(SR.Arg_NamedParamNull, nameof(namedParams)); 410throw new ArgumentException(SR.Arg_CreatInstAccess, nameof(bindingFlags)); 435throw new ArgumentException(SR.Arg_FldSetGet, nameof(bindingFlags)); 438throw new ArgumentException(SR.Arg_FldGetPropSet, nameof(bindingFlags)); 447throw new ArgumentException(SR.Arg_FldSetPropGet, nameof(bindingFlags)); 450throw new ArgumentException(SR.Arg_FldSetInvoke, nameof(bindingFlags)); 496throw new ArgumentException(SR.Arg_IndexMustBeInt); 519throw new ArgumentException(SR.Arg_FldGetArgErr, nameof(bindingFlags)); 526throw new ArgumentException(SR.Arg_FldSetArgErr, nameof(bindingFlags)); 548throw new ArgumentException(SR.Arg_PropSetGet, nameof(bindingFlags)); 557throw new ArgumentException(SR.Arg_PropSetInvoke, nameof(bindingFlags)); 722SR.Format(SR.Argument_NeverValidGenericArgument, type)); 737SR.Format(SR.Argument_NotEnoughGenArguments, genericArguments.Length, genericParameters.Length)); 804throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 806throw new NotSupportedException(SR.NotSupported_ByRefLike); 875throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 877throw new NotSupportedException(SR.NotSupported_ByRefLike);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (4)
67throw new ArgumentException(SR.Arg_MustBeSByte); 255throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "SByte", "DateTime")); 1374static string IBinaryIntegerParseAndFormatInfo<sbyte>.OverflowMessage => SR.Overflow_SByte;
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.cs (1)
219throw new ArgumentException(SR.Argument_SearchValues_UnsupportedStringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\Security\CryptographicException.cs (4)
16: base(SR.Arg_CryptographyException) 21: base(SR.Arg_CryptographyException) 27: base(message ?? SR.Arg_CryptographyException) 32: base(message ?? SR.Arg_CryptographyException, inner)
src\libraries\System.Private.CoreLib\src\System\Security\PermissionSet.cs (3)
26public static byte[] ConvertPermissionSet(string inFormat, byte[] inData, string outFormat) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); } 31public void Deny() { throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); } 43public void PermitOnly() { throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); }
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (5)
79throw new ArgumentOutOfRangeException(nameof(capacity), SR.ArgumentOutOfRange_Capacity); 177throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexString); 224throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexString); 256throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexString); 297throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Security\SecurityElement.cs (20)
39throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 49throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 52throw new ArgumentException(SR.Format(SR.Argument_InvalidElementText, text)); 68throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 115throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, attrName)); 118throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, attrValue)); 141throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 159throw new ArgumentException(SR.ArgumentNull_Child); 183throw new ArgumentException(SR.Argument_AttributeNamesMustBeUnique); 197throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, name)); 200throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, value));
src\libraries\System.Private.CoreLib\src\System\Security\SecurityException.cs (5)
23: base(SR.Arg_SecurityException) 29: base(message ?? SR.Arg_SecurityException) 35: base(message ?? SR.Arg_SecurityException, inner) 41: base(message ?? SR.Arg_SecurityException) 48: base(message ?? SR.Arg_SecurityException)
src\libraries\System.Private.CoreLib\src\System\Security\VerificationException.cs (3)
15: base(SR.Verification_Exception) 21: base(message ?? SR.Verification_Exception) 27: base(message ?? SR.Verification_Exception, innerException)
src\libraries\System.Private.CoreLib\src\System\Single.cs (5)
266return (value is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeSingle); 454throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Single", "Char")); 514throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Single", "DateTime"));
src\libraries\System.Private.CoreLib\src\System\Span.cs (2)
195throw new NotSupportedException(SR.NotSupported_CannotCallEqualsOnSpan); 206throw new NotSupportedException(SR.NotSupported_CannotCallGetHashCodeOnSpan);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (1)
448throw new ArgumentException(SR.Arg_MustBeNullTerminatedString);
src\libraries\System.Private.CoreLib\src\System\StackOverflowException.cs (3)
17: base(SR.Arg_StackOverflowException) 23: base(message ?? SR.Arg_StackOverflowException) 29: base(message ?? SR.Arg_StackOverflowException, innerException)
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (10)
114throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 120throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 130throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart), assemblyNameException); 163SR.Format(SR.Argument_StartupHookAssemblyLoadFailed, startupHook.Path ?? startupHook.AssemblyName!.ToString()), 204throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSignature,
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (10)
260throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 388throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 394throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 480throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 489throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 513throw new ArgumentException(SR.Arg_MustBeString); 574throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 683throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 741throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 998throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\String.cs (4)
160throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_PartialWCHAR); 166throw new ArgumentOutOfRangeException(nameof(ptr), SR.ArgumentOutOfRange_PartialWCHAR); 220throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_PartialWCHAR); 279throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_PartialWCHAR);
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (5)
1171throw new ArgumentOutOfRangeException(nameof(startIndex), startIndex < 0 ? SR.ArgumentOutOfRange_StartIndex : SR.ArgumentOutOfRange_StartIndexLargerThanLength); 1200throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 2272throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_StartIndexLargerThanLength); 2277throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_IndexLength);
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (3)
74throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 285: new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 423: new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (3)
42_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 175throw new ArgumentException(SR.Argument_ImplementIComparable); 231throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\libraries\System.Private.CoreLib\src\System\SystemException.cs (1)
15: base(SR.Arg_SystemException)
src\libraries\System.Private.CoreLib\src\System\Text\ASCIIEncoding.cs (2)
850throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow); 867throw new ArgumentOutOfRangeException(nameof(byteCount), SR.ArgumentOutOfRange_GetCharCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (5)
41SR.Argument_FallbackBufferNotEmpty, nameof(value)); 232SR.ArgumentOutOfRange_IndexCountBuffer); 236SR.ArgumentOutOfRange_IndexCountBuffer); 257throw new ArgumentException(SR.Argument_ConversionOverflow); 299throw new ArgumentException(SR.Argument_ConversionOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\DecoderExceptionFallback.cs (3)
66SR.Format(SR.Argument_InvalidCodePageBytesIndex, 80: base(SR.Arg_ArgumentException)
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (9)
127throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 134throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 150throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 182throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 189throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 199throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 241throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 312SR.Format(SR.Argument_RecursiveFallbackBytes,
src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (5)
58SR.ArgumentOutOfRange_IndexCountBuffer); 97SR.ArgumentOutOfRange_IndexCountBuffer); 101SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 148SR.ArgumentOutOfRange_IndexCountBuffer); 152SR.ArgumentOutOfRange_IndexCountBuffer);
src\libraries\System.Private.CoreLib\src\System\Text\DecoderReplacementFallback.cs (1)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement));
src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (5)
41SR.Argument_FallbackBufferNotEmpty, nameof(value)); 230SR.ArgumentOutOfRange_IndexCountBuffer); 234SR.ArgumentOutOfRange_IndexCountBuffer); 257throw new ArgumentException(SR.Argument_ConversionOverflow); 298throw new ArgumentException(SR.Argument_ConversionOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\EncoderExceptionFallback.cs (13)
39SR.Format(SR.Argument_InvalidCodePageConversionIndex, (int)charUnknown, index), charUnknown, index); 47SR.Format(SR.ArgumentOutOfRange_Range, 0xD800, 0xDBFF)); 52SR.Format(SR.ArgumentOutOfRange_Range, 0xDC00, 0xDFFF)); 59SR.Format(SR.Argument_InvalidCodePageConversionIndex, iTemp, index), charUnknownHigh, charUnknownLow, index); 81: base(SR.Arg_ArgumentException) 111SR.Format(SR.ArgumentOutOfRange_Range, 0xD800, 0xDBFF)); 116SR.Format(SR.ArgumentOutOfRange_Range, 0xDC00, 0xDFFF));
src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (3)
285throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 357throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
src\libraries\System.Private.CoreLib\src\System\Text\EncoderLatin1BestFitFallback.cs (4)
57SR.Format(SR.ArgumentOutOfRange_Range, 62SR.Format(SR.ArgumentOutOfRange_Range,
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (7)
53SR.ArgumentOutOfRange_IndexCountBuffer); 87SR.ArgumentOutOfRange_IndexCountBuffer); 91SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 135SR.ArgumentOutOfRange_IndexCountBuffer); 139SR.ArgumentOutOfRange_IndexCountBuffer); 243throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\EncoderReplacementFallback.cs (5)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement)); 122SR.Format(SR.ArgumentOutOfRange_Range, 0xD800, 0xDBFF)); 126SR.Format(SR.ArgumentOutOfRange_Range, 0xDC00, 0xDFFF));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (19)
222throw new ArgumentException(SR.Format(SR.Argument_CodepageNotSupported, codepage), nameof(codepage)); 240string exceptionMessage = SR.Format(SR.Encoding_UTF7_Disabled, moreInfoUrl); 249nameof(codepage), SR.Format(SR.ArgumentOutOfRange_Range, 0, 65535)); 252throw new NotSupportedException(SR.Format(SR.NotSupported_NoCodepageData, codepage)); 334throw new NotSupportedException(SR.Format(SR.NotSupported_NoCodepageData, _codePage)); 477throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 491throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1099SR.Format(SR.Argument_EncodingConversionOverflowBytes, _codePage, EncoderFallback.GetType()), "bytes"); 1119throw new ArgumentException(SR.Argument_ConversionOverflow); 1127SR.Format(SR.Argument_EncodingConversionOverflowChars, _codePage, DecoderFallback.GetType()), "chars"); 1438throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty,
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (10)
100SR.Format(SR.Argument_EncodingNotSupported, name), 242case 1200: return SR.Globalization_cp_1200; 243case 1201: return SR.Globalization_cp_1201; 244case 12000: return SR.Globalization_cp_12000; 245case 12001: return SR.Globalization_cp_12001; 246case 20127: return SR.Globalization_cp_20127; 247case 28591: return SR.Globalization_cp_28591; 248case 65000: return SR.Globalization_cp_65000; 249case 65001: return SR.Globalization_cp_65001;
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (1)
165throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (1)
1478throw new ArgumentException(SR.Arg_MustBeRune);
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (36)
127throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_IndexLength); 152throw new ArgumentOutOfRangeException(nameof(capacity), SR.ArgumentOutOfRange_Capacity); 201throw new SerializationException(SR.Serialization_StringBuilderMaxCapacity); 212throw new SerializationException(SR.Serialization_StringBuilderCapacity); 272throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_Capacity); 276throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity); 336throw new ArgumentOutOfRangeException(nameof(chunkLength), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 362throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_StartIndexLargerThanLength); 367throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_IndexLength); 395throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_SmallCapacity); 479throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 487throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLess); 689throw new ArgumentOutOfRangeException(nameof(repeatCount), SR.ArgumentOutOfRange_LengthGreaterThanCapacity); 735throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 784throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 823throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 840throw new ArgumentOutOfRangeException(nameof(Capacity), SR.ArgumentOutOfRange_Capacity); 877throw new ArgumentException(SR.ArgumentOutOfRange_OffsetOut); 889throw new ArgumentOutOfRangeException(nameof(sourceIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 894throw new ArgumentException(SR.Arg_LongerThanSrcString); 941throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 981throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 1295throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 1322throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 1333throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 1348throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 1364throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 1400throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2084throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2088throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2092throw new ArgumentException(SR.Arg_EmptySpan, nameof(oldValue)); 2213throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2218throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 2306throw new ArgumentOutOfRangeException(nameof(valueCount), SR.ArgumentOutOfRange_LengthGreaterThanCapacity); 2554throw new ArgumentOutOfRangeException("requiredLength", SR.ArgumentOutOfRange_SmallCapacity); 2643throw new ArgumentOutOfRangeException("requiredLength", SR.ArgumentOutOfRange_SmallCapacity);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (3)
77public override long Length => throw new NotSupportedException(SR.NotSupported_UnseekableStream); 81get => throw new NotSupportedException(SR.NotSupported_UnseekableStream); 447=> throw new NotSupportedException(SR.NotSupported_UnseekableStream);
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (20)
93throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer); 150throw new ArgumentOutOfRangeException(nameof(s), SR.ArgumentOutOfRange_IndexCount); 153throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 185throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer); 188throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 234throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 274throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 277throw new ArgumentOutOfRangeException(nameof(charIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 323throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 348throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_GetByteCountOverflow); 373throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 591SR.Format(SR.Argument_RecursiveFallback, charLeftOver), nameof(chars)); 656throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 929SR.Format(SR.Argument_RecursiveFallback, charLeftOver), nameof(chars)); 1766throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow); 1786throw new ArgumentOutOfRangeException(nameof(byteCount), SR.ArgumentOutOfRange_GetCharCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (17)
101throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer); 158throw new ArgumentOutOfRangeException(nameof(s), SR.ArgumentOutOfRange_IndexCount); 161throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 193throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer); 196throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 242throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 282throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 285throw new ArgumentOutOfRangeException(nameof(charIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 331throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 366throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType().ToString() ?? string.Empty)); 464throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_GetByteCountOverflow); 501throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 808throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_GetByteCountOverflow); 1073throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow); 1099throw new ArgumentOutOfRangeException(nameof(byteCount), SR.ArgumentOutOfRange_GetCharCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (11)
137throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer); 194throw new ArgumentOutOfRangeException(nameof(s), SR.ArgumentOutOfRange_IndexCount); 197throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 229throw new ArgumentOutOfRangeException(nameof(chars), SR.ArgumentOutOfRange_IndexCountBuffer); 232throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 278throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 318throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 321throw new ArgumentOutOfRangeException(nameof(charIndex), SR.ArgumentOutOfRange_IndexMustBeLessOrEqual); 367throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer); 739throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow); 896throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (2)
819throw new ArgumentOutOfRangeException(nameof(charCount), SR.ArgumentOutOfRange_GetByteCountOverflow); 855throw new ArgumentOutOfRangeException(nameof(byteCount), SR.ArgumentOutOfRange_GetCharCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.Sealed.cs (4)
89message: (charCount < 0) ? SR.ArgumentOutOfRange_NeedNonNegNum : SR.ArgumentOutOfRange_GetByteCountOverflow); 111message: (byteCount < 0) ? SR.ArgumentOutOfRange_NeedNonNegNum : SR.ArgumentOutOfRange_GetCharCountOverflow);
src\libraries\System.Private.CoreLib\src\System\Threading\AbandonedMutexException.cs (6)
18: base(SR.Threading_AbandonedMutexException) 24: base(message ?? SR.Threading_AbandonedMutexException) 30: base(message ?? SR.Threading_AbandonedMutexException, inner) 36: base(SR.Threading_AbandonedMutexException) 43: base(message ?? SR.Threading_AbandonedMutexException) 50: base(message ?? SR.Threading_AbandonedMutexException, inner)
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationToken.cs (1)
368throw new OperationCanceledException(SR.OperationCanceled, this);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (2)
305return Task.FromException(new ObjectDisposedException(GetType().FullName, SR.CancellationTokenSource_Disposed)); 8840 => throw new ArgumentException(SR.CancellationToken_CreateLinkedToken_TokensIsEmpty),
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.cs (5)
26throw new ArgumentException(SR.Argument_InvalidFlag, nameof(mode)); 39throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 41throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, name));
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.Windows.cs (4)
23throw new PlatformNotSupportedException(SR.PlatformNotSupported_NamedSynchronizationPrimitives); 36throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 70throw new PlatformNotSupportedException(SR.PlatformNotSupported_NamedSynchronizationPrimitives);
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (5)
119throw new InvalidOperationException(SR.InvalidOperation_CannotRestoreUnsuppressedFlow); 436SR.ExecutionContext_ExceptionInAsyncLocalNotification, 445throw new InvalidOperationException(SR.InvalidOperation_NullContext); 569throw new InvalidOperationException(SR.InvalidOperation_CannotUseAFCOtherThread); 584throw new InvalidOperationException(SR.InvalidOperation_AsyncFlowCtrlCtxMismatch);
src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (4)
67throw new MissingMemberException(SR.Lazy_CreateValue_NoParameterlessCtorForT); 117throw new InvalidOperationException(SR.Lazy_StaticInit_InvalidOperation); 173throw new MissingMemberException(SR.Lazy_CreateValue_NoParameterlessCtorForT); 272throw new InvalidOperationException(SR.Lazy_StaticInit_InvalidOperation);
src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
336throw new LockRecursionException(SR.Lock_Enter_LockRecursionException);
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (2)
131throw new InvalidOperationException(SR.Format(SR.ManualResetEventSlim_ctor_TooManyWaiters, NumWaitersState_MaxValue));
src\libraries\System.Private.CoreLib\src\System\Threading\Mutex.cs (4)
48throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 50throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, name));
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
78throw new InvalidOperationException(SR.InvalidOperation_Overlapped_Pack); 103throw new InvalidOperationException(SR.InvalidOperation_Overlapped_Pack);
src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (18)
307throw new LockRecursionException(SR.LockRecursionException_ReadAfterWriteNotAllowed); 321throw new LockRecursionException(SR.LockRecursionException_RecursiveReadNotAllowed); 455throw new LockRecursionException(SR.LockRecursionException_RecursiveWriteNotAllowed); 475throw new LockRecursionException(SR.LockRecursionException_WriteAfterReadNotAllowed); 512throw new LockRecursionException(SR.LockRecursionException_WriteAfterReadNotAllowed); 660throw new LockRecursionException(SR.LockRecursionException_RecursiveUpgradeNotAllowed); 665throw new LockRecursionException(SR.LockRecursionException_UpgradeAfterWriteNotAllowed); 674throw new LockRecursionException(SR.LockRecursionException_UpgradeAfterReadNotAllowed); 706throw new LockRecursionException(SR.LockRecursionException_UpgradeAfterReadNotAllowed); 777throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedRead); 813throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedWrite); 825throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedWrite); 831throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedWrite); 860throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedUpgrade); 872throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedUpgrade); 878throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedUpgrade); 1255throw new SynchronizationLockException(SR.SynchronizationLockException_IncorrectDispose); 1258throw new SynchronizationLockException(SR.SynchronizationLockException_IncorrectDispose);
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.cs (5)
28throw new ArgumentException(SR.Argument_SemaphoreInitialMaximum); 41throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 43throw new IOException(SR.Format(SR.IO_PathNotFound_Path, name));
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.Windows.cs (4)
28throw new PlatformNotSupportedException(SR.PlatformNotSupported_NamedSynchronizationPrimitives); 39SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 75throw new PlatformNotSupportedException(SR.PlatformNotSupported_NamedSynchronizationPrimitives);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreFullException.cs (3)
14public SemaphoreFullException() : base(SR.Threading_SemaphoreFullException) 18public SemaphoreFullException(string? message) : base(message ?? SR.Threading_SemaphoreFullException) 22public SemaphoreFullException(string? message, Exception? innerException) : base(message ?? SR.Threading_SemaphoreFullException, innerException)
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (8)
152nameof(initialCount), initialCount, SR.SemaphoreSlim_ctor_InitialCountWrong); 158throw new ArgumentOutOfRangeException(nameof(maxCount), maxCount, SR.SemaphoreSlim_ctor_MaxCountWrong); 218nameof(timeout), timeout, SR.SemaphoreSlim_Wait_TimeoutWrong); 249nameof(timeout), timeout, SR.SemaphoreSlim_Wait_TimeoutWrong); 295nameof(millisecondsTimeout), millisecondsTimeout, SR.SemaphoreSlim_Wait_TimeoutWrong); 573nameof(timeout), timeout, SR.SemaphoreSlim_Wait_TimeoutWrong); 605nameof(millisecondsTimeout), millisecondsTimeout, SR.SemaphoreSlim_Wait_TimeoutWrong); 768nameof(releaseCount), releaseCount, SR.SemaphoreSlim_Release_CountWrong);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (5)
229nameof(timeout), timeout, SR.SpinLock_TryEnter_ArgumentOutOfRange); 281throw new ArgumentException(SR.SpinLock_TryReliableEnter_ArgumentException); 287nameof(millisecondsTimeout), millisecondsTimeout, SR.SpinLock_TryEnter_ArgumentOutOfRange); 418throw new LockRecursionException(SR.SpinLock_TryEnter_LockRecursionException); 574throw new InvalidOperationException(SR.SpinLock_IsHeldByCurrentThread);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinWait.cs (2)
286nameof(timeout), timeout, SR.SpinWait_SpinUntil_TimeoutWrong); 308nameof(millisecondsTimeout), millisecondsTimeout, SR.SpinWait_SpinUntil_TimeoutWrong);
src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationLockException.cs (3)
18: base(SR.Arg_SynchronizationLockException) 24: base(message ?? SR.Arg_SynchronizationLockException) 30: base(message ?? SR.Arg_SynchronizationLockException, innerException)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (2)
351IsCompletedSuccessfully ? "" + m_result : SR.TaskT_DebuggerNoResult; 538new ArgumentOutOfRangeException(nameof(options), SR.TaskT_ConfigureAwait_InvalidOptions));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCanceledException.cs (5)
31public TaskCanceledException() : base(SR.TaskCanceledException_ctor_DefaultMessage) 40public TaskCanceledException(string? message) : base(message ?? SR.TaskCanceledException_ctor_DefaultMessage) 51public TaskCanceledException(string? message, Exception? innerException) : base(message ?? SR.TaskCanceledException_ctor_DefaultMessage, innerException) 63public TaskCanceledException(string? message, Exception? innerException, CancellationToken token) : base(message ?? SR.TaskCanceledException_ctor_DefaultMessage, innerException, token) 73base(SR.TaskCanceledException_ctor_DefaultMessage, task != null ? task.CancellationToken : CancellationToken.None)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (1)
327throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (1)
329throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (2)
65SR.TaskExceptionHolder_UnhandledException, 199throw new ArgumentException(SR.TaskExceptionHolder_UnknownExceptionType, nameof(exceptionObject));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (9)
1512throw new ArgumentOutOfRangeException(nameof(creationOptions), SR.Task_FromAsync_LongRunning); 1514throw new ArgumentOutOfRangeException(nameof(creationOptions), SR.Task_FromAsync_PreferFairness); 2350if (task == null) throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks)); 2973throw new ArgumentException(SR.Task_MultiTaskContinuation_EmptyTaskList, nameof(tasks)); 2981throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks)); 2992throw new ArgumentException(SR.Task_MultiTaskContinuation_EmptyTaskList, nameof(tasks)); 3000throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks)); 3018throw new ArgumentOutOfRangeException(nameof(continuationOptions), SR.Task_ContinueWith_ESandLR); 3037throw new ArgumentOutOfRangeException(nameof(continuationOptions), SR.Task_MultiTaskContinuation_FireOptions);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (3)
196throw new InvalidOperationException(SR.TaskScheduler_InconsistentStateAfterTryExecuteTaskInline); 408throw new InvalidOperationException(SR.TaskScheduler_ExecuteTask_WrongTaskScheduler); 554throw new InvalidOperationException(SR.TaskScheduler_FromCurrentSynchronizationContext_NoCurrent);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskSchedulerException.cs (4)
29public TaskSchedulerException() : base(SR.TaskSchedulerException_ctor_DefaultMessage) // 38public TaskSchedulerException(string? message) : base(message ?? SR.TaskSchedulerException_ctor_DefaultMessage) 49: base(SR.TaskSchedulerException_ctor_DefaultMessage, innerException) 60public TaskSchedulerException(string? message, Exception? innerException) : base(message ?? SR.TaskSchedulerException_ctor_DefaultMessage, innerException)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (2)
251SR.Argument_UnexpectedStateForKnownCallback); 658SR.Argument_UnexpectedStateForKnownCallback);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (11)
211throw new InvalidOperationException(SR.InvalidOperation_ThreadWrongThreadStart); 263throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 277throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 449throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadAbort); 455throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadAbort); 461throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadAbort); 467throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadSuspend); 473throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadSuspend); 519throw new ArgumentOutOfRangeException(nameof(state), SR.ArgumentOutOfRange_Enum); 529throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported); 535throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (2)
322throw new InvalidOperationException(SR.ThreadLocal_Value_RecursiveCallsToValue); 427throw new InvalidOperationException(SR.ThreadLocal_ValuesNotAvailable);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (3)
99throw new PlatformNotSupportedException(SR.PlatformNotSupported_OverlappedIO); 104throw new PlatformNotSupportedException(SR.PlatformNotSupported_OverlappedIO); 108throw new PlatformNotSupportedException(SR.PlatformNotSupported_OverlappedIO);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Portable.cs (3)
46throw new ArgumentException(SR.Argument_PreAllocatedAlreadyAllocated, nameof(preAllocated)); 68throw new ArgumentException(SR.Argument_NativeOverlappedWrongBoundHandle, nameof(overlapped)); 94throw new ArgumentException(SR.Argument_NativeOverlappedAlreadyFree, nameof(overlapped), ex);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Unix.cs (2)
79throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle)); 81throw new PlatformNotSupportedException(SR.PlatformNotSupported_OverlappedIO);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandleOverlapped.cs (2)
44throw new InvalidOperationException(SR.InvalidOperation_NativeOverlappedReused); 49throw new InvalidOperationException(SR.Argument_NativeOverlappedAlreadyFree);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (2)
1384throw new ArgumentOutOfRangeException(nameof(millisecondsTimeOutInterval), SR.ArgumentOutOfRange_LessEqualToIntegerMaxVal); 1401throw new ArgumentOutOfRangeException(nameof(millisecondsTimeOutInterval), SR.ArgumentOutOfRange_NeedNonNegOrNegative1);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadStartException.cs (2)
14: base(SR.Arg_ThreadStartException) 20: base(SR.Arg_ThreadStartException, reason)
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadStateException.cs (3)
18: base(SR.Arg_ThreadStateException) 24: base(message ?? SR.Arg_ThreadStateException) 30: base(message ?? SR.Arg_ThreadStateException, innerException)
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
630var e = new InvalidOperationException(SR.InvalidOperation_TimerAlreadyClosed);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (4)
254throw new ArgumentNullException($"waitHandles[{i}]", SR.ArgumentNull_ArrayElement); 306throw new ArgumentException(SR.Argument_EmptyWaithandleArray, nameof(waitHandles)); 310throw new NotSupportedException(SR.NotSupported_MaxWaitHandles); 502var ex = new InvalidOperationException(SR.InvalidOperation_InvalidHandle);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandleCannotBeOpenedException.cs (3)
14public WaitHandleCannotBeOpenedException() : base(SR.Threading_WaitHandleCannotBeOpenedException) 19public WaitHandleCannotBeOpenedException(string? message) : base(message ?? SR.Threading_WaitHandleCannotBeOpenedException) 24public WaitHandleCannotBeOpenedException(string? message, Exception? innerException) : base(message ?? SR.Threading_WaitHandleCannotBeOpenedException, innerException)
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (163)
77throw new ArrayTypeMismatchException(SR.ArrayTypeMismatch_CantAssignType); 83throw new InvalidCastException(SR.InvalidCast_DownCastArrayElement); 89throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType)); 107throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 113throw new ArgumentException(SR.Argument_InvalidTimeSpanStyles, "styles"); 119throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, value, typeof(TEnum).Name), argumentName); 125throw new ArgumentException(SR.Argument_OverlapAlignmentMismatch); 131throw new ArgumentNullException("value", SR.ArgumentNull_TypedRefType); 143throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 163throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer)); 218throw new ArgumentOutOfRangeException(nameof(month), month, SR.ArgumentOutOfRange_Month); 224throw new ArgumentOutOfRangeException(nameof(dayNumber), dayNumber, SR.ArgumentOutOfRange_DayNumber); 230throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadYearMonthDay); 236throw new ArgumentOutOfRangeException(null, SR.ArgumentOutOfRange_BadHourMinuteSecond); 242throw new ArgumentOutOfRangeException(null, SR.Overflow_TimeSpanTooLong); 248throw new ArgumentOutOfRangeException(name, SR.ArgumentOutOfRange_RoundingDigits); 254throw new ArgumentOutOfRangeException(name, SR.ArgumentOutOfRange_RoundingDigits_MathF); 260throw new ArgumentOutOfRangeException(parameterName, value, SR.Format(SR.ArgumentOutOfRange_Range, minInclusive, maxInclusive)); 272throw new OverflowException(SR.Overflow_NegateTwosCompNum); 278throw new OverflowException(SR.Overflow_TimeSpanTooLong); 284throw new OverflowException(SR.Overflow_Duration); 290throw new ArgumentException(SR.Arg_CannotBeNaN); 296throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument)); 315return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key)); 347throw new ArgumentException(SR.Arg_HandleNotSync, paramName); 353throw new ArgumentException(SR.Arg_HandleNotAsync, paramName); 399new EndOfStreamException(SR.IO_EOF_ReadBeyondEOF); 422throw new NullReferenceException(SR.Arg_NullArgumentNullRef); 446throw new NotSupportedException(SR.NotSupported_UnseekableStream); 452throw new NotSupportedException(SR.NotSupported_UnreadableStream); 458throw new NotSupportedException(SR.NotSupported_UnwritableStream); 476throw new ObjectDisposedException(objectName, SR.ObjectDisposed_StreamClosed); 482throw new ObjectDisposedException(null, SR.ObjectDisposed_FileClosed); 518throw new OutOfMemoryException(SR.OutOfMemory_StringTooLong); 524throw new OutOfMemoryException(SR.Lock_Enter_WaiterCountOverflow_OutOfMemoryException); 530throw new ArgumentException(SR.Argument_IncompatibleArrayType); 536throw new ArgumentException(SR.Arg_InvalidHandle, paramName); 542throw new ArgumentOutOfRangeException(nameof(state), state, SR.Argument_UnexpectedStateForKnownCallback); 548throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 554throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 566throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 572throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 578throw new InvalidOperationException(SR.InvalidOperation_NoValue); 584throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported); 590throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized); 596throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotPinned); 608throw new InvalidOperationException(SR.InvalidOperation_InvalidUtf8); 614throw new FormatException(SR.Argument_BadFormatSpecifier); 620throw new FormatException(SR.Format_NeedSingleChar); 626throw new FormatException(SR.Format(SR.Format_BadBoolean, new string(value))); 632throw new ArgumentOutOfRangeException("precision", SR.Format(SR.Argument_PrecisionTooLarge, StandardFormat.MaxPrecision)); 638throw new ArgumentOutOfRangeException("symbol", SR.Argument_BadFormatSpecifier); 644throw new ArgumentOutOfRangeException(paramName, SR.ArgumentOutOfRange_NeedNonNegNum); 650throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_Enum); 674throw new FormatException(SR.Format_InvalidString); 680throw new FormatException(SR.Format(SR.Format_InvalidStringWithOffsetAndReason, offset, GetResourceString(resource))); 686throw new FormatException(SR.Format_IndexOutOfRange); 692throw new SynchronizationLockException(SR.Lock_Exit_SynchronizationLockException); 698return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_MemberInfo, declaringType, memberInfo)); 703return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_Attribute, attribute)); 708return new AmbiguousMatchException(SR.Format(SR.Arg_AmbiguousMatchException_CustomAttributeData, customAttributeData)); 716return new ArgumentOutOfRangeException(nameof(offset), SR.ArgumentOutOfRange_NeedNonNegNum); 718return new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum); 721return new ArgumentException(SR.Argument_InvalidOffLen); 736return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 741return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value)); 746return new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key)); 768SR.InvalidOperation_EnumNotStarted : 769SR.InvalidOperation_EnumEnded); 1090return SR.ArgumentOutOfRange_IndexMustBeLessOrEqual; 1092return SR.ArgumentOutOfRange_IndexMustBeLess; 1094return SR.ArgumentOutOfRange_IndexCount; 1096return SR.ArgumentOutOfRange_IndexCountBuffer; 1098return SR.ArgumentOutOfRange_Count; 1100return SR.ArgumentOutOfRange_Year; 1102return SR.Arg_ArrayPlusOffTooSmall; 1104return SR.Arg_ByteArrayTooSmallForValue; 1106return SR.NotSupported_ReadOnlyCollection; 1108return SR.Arg_RankMultiDimNotSupported; 1110return SR.Arg_NonZeroLowerBound; 1112return SR.ArgumentOutOfRange_GetCharCountOverflow; 1114return SR.ArgumentOutOfRange_ListInsert; 1116return SR.ArgumentOutOfRange_NeedNonNegNum; 1118return SR.ArgumentOutOfRange_SmallCapacity; 1120return SR.Argument_InvalidOffLen; 1122return SR.Argument_CannotExtractScalar; 1124return SR.ArgumentOutOfRange_BiggerThanCollection; 1126return SR.Serialization_MissingKeys; 1128return SR.Serialization_NullKey; 1130return SR.NotSupported_KeyCollectionSet; 1132return SR.NotSupported_ValueCollectionSet; 1134return SR.InvalidOperation_NullArray; 1136return SR.TaskT_TransitionToFinal_AlreadyCompleted; 1138return SR.TaskCompletionSourceT_TrySetException_NullException; 1140return SR.TaskCompletionSourceT_TrySetException_NoExceptions; 1142return SR.NotSupported_StringComparison; 1144return SR.ConcurrentCollection_SyncRoot_NotSupported; 1146return SR.Task_MultiTaskContinuation_NullTask; 1148return SR.InvalidOperation_WrongAsyncResultOrEndCalledMultiple; 1150return SR.Task_MultiTaskContinuation_EmptyTaskList; 1152return SR.Task_Start_TaskCompleted; 1154return SR.Task_Start_Promise; 1156return SR.Task_Start_ContinuationTask; 1158return SR.Task_Start_AlreadyStarted; 1160return SR.Task_RunSynchronously_Continuation; 1162return SR.Task_RunSynchronously_Promise; 1164return SR.Task_RunSynchronously_TaskCompleted; 1166return SR.Task_RunSynchronously_AlreadyStarted; 1168return SR.AsyncMethodBuilder_InstanceNotInitialized; 1170return SR.Task_ContinueWith_ESandLR; 1172return SR.Task_ContinueWith_NotOnAnything; 1174return SR.Task_InvalidTimerTimeSpan; 1176return SR.Task_Delay_InvalidMillisecondsDelay; 1178return SR.Task_Dispose_NotCompleted; 1180return SR.Task_ThrowIfDisposed; 1182return SR.Task_WaitMulti_NullTask; 1184return SR.ArgumentException_OtherNotArrayOfCorrectLength; 1186return SR.ArgumentNull_Array; 1188return SR.ArgumentNull_SafeHandle; 1190return SR.ArgumentOutOfRange_EndIndexStartIndex; 1192return SR.ArgumentOutOfRange_Enum; 1194return SR.ArgumentOutOfRange_HugeArrayNotSupported; 1196return SR.Argument_AddingDuplicate; 1198return SR.Argument_InvalidArgumentForComparison; 1200return SR.Arg_LowerBoundsMustMatch; 1202return SR.Arg_MustBeType; 1204return SR.Arg_Need1DArray; 1206return SR.Arg_Need2DArray; 1208return SR.Arg_Need3DArray; 1210return SR.Arg_NeedAtLeast1Rank; 1212return SR.Arg_RankIndices; 1214return SR.Arg_RanksAndBounds; 1216return SR.InvalidOperation_IComparerFailed; 1218return SR.NotSupported_FixedSizeCollection; 1220return SR.Rank_MultiDimNotSupported; 1222return SR.Arg_TypeNotSupported; 1224return SR.Argument_SpansMustHaveSameLength; 1226return SR.Argument_InvalidFlag; 1228return SR.CancellationTokenSource_Disposed; 1230return SR.Argument_AlignmentMustBePow2; 1232return SR.ArgumentOutOfRange_NotGreaterThanBufferLength; 1234return SR.InvalidOperation_SpanOverlappedOperation; 1236return SR.InvalidOperation_TimeProviderNullLocalTimeZone; 1238return SR.InvalidOperation_TimeProviderInvalidTimestampFrequency; 1240return SR.Format_UnexpectedClosingBrace; 1242return SR.Format_UnclosedFormatItem; 1244return SR.Format_ExpectedAsciiDigit; 1246return SR.Argument_HasToBeArrayClass;
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (11)
84throw new ArgumentOutOfRangeException(nameof(ticks), SR.ArgumentOutOfRange_TimeOnlyBadTicks); 413throw new ArgumentException(SR.Arg_MustBeTimeOnly); 865case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style"); 866case ParseFailureKind.Argument_BadFormatSpecifier: throw new FormatException(SR.Argument_BadFormatSpecifier); 867case ParseFailureKind.Format_BadTimeOnly: throw new FormatException(SR.Format(SR.Format_BadTimeOnly, s.ToString())); 870throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(TimeOnly))); 944throw new FormatException(SR.Format_InvalidString); 996throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(TimeOnly)));
src\libraries\System.Private.CoreLib\src\System\TimeoutException.cs (3)
18: base(SR.Arg_TimeoutException) 24: base(message ?? SR.Arg_TimeoutException) 30: base(message ?? SR.Arg_TimeoutException, innerException)
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
287throw new ArgumentException(SR.Arg_MustBeTimeSpan);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (9)
184throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateStart)); 189throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateEnd)); 194throw new ArgumentException(SR.Argument_TransitionTimesAreIdentical, nameof(daylightTransitionEnd)); 199throw new ArgumentException(SR.Argument_OutOfOrderDateTimes, nameof(dateStart)); 208throw new ArgumentOutOfRangeException(nameof(daylightDelta), daylightDelta, SR.ArgumentOutOfRange_UtcOffset); 213throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(daylightDelta)); 218throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateStart)); 223throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateEnd)); 259throw new SerializationException(SR.Serialization_InvalidData, e);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (21)
195throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset)); 210throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset)); 240throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 269throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 616throw new SecurityException(SR.Format(SR.Security_CannotReadFileData, id), e); 618throw new TimeZoneNotFoundException(SR.Format(SR.TimeZoneNotFound_MissingData, id), e); 756throw new ArgumentException(SR.Argument_ConvertMismatch, nameof(sourceTimeZone)); 781throw new ArgumentException(SR.Argument_DateTimeIsInvalid, nameof(dateTime)); 870throw new ArgumentException(SR.Format(SR.Argument_InvalidSerializedString, source), nameof(source)); 1131throw new SerializationException(SR.Format(SR.Serialization_CorruptField, "SupportsDaylightSavingTime")); 1136throw new SerializationException(SR.Serialization_InvalidData, e); 1140throw new SerializationException(SR.Serialization_InvalidData, e); 2149throw new ArgumentOutOfRangeException(nameof(baseUtcOffset), SR.ArgumentOutOfRange_UtcOffset); 2154throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(baseUtcOffset)); 2176throw new InvalidTimeZoneException(SR.Argument_AdjustmentRulesNoNulls); 2181throw new InvalidTimeZoneException(SR.ArgumentOutOfRange_UtcOffsetAndDaylightDelta); 2187throw new InvalidTimeZoneException(SR.Argument_AdjustmentRulesOutOfOrder);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.StringSerializer.cs (33)
114throw new SerializationException(SR.Serialization_InvalidData, ex); 118throw new SerializationException(SR.Serialization_InvalidData, ex); 183throw new SerializationException(SR.Format(SR.Serialization_InvalidEscapeSequence, c)); 196throw new SerializationException(SR.Serialization_InvalidData); 238throw new SerializationException(SR.Serialization_InvalidData); 246throw new SerializationException(SR.Serialization_InvalidData); 260throw new SerializationException(SR.Serialization_InvalidData); 264throw new SerializationException(SR.Serialization_InvalidData); 288throw new SerializationException(SR.Serialization_InvalidData); 292throw new SerializationException(SR.Serialization_InvalidData); 308throw new SerializationException(SR.Serialization_InvalidData); 322throw new SerializationException(SR.Format(SR.Serialization_InvalidEscapeSequence, string.Empty)); 325throw new SerializationException(SR.Serialization_InvalidData); 336throw new SerializationException(SR.Serialization_InvalidData); 353throw new SerializationException(SR.Serialization_InvalidData, e); 365throw new SerializationException(SR.Serialization_InvalidData); 391throw new SerializationException(SR.Serialization_InvalidData); 395throw new SerializationException(SR.Serialization_InvalidData); 414throw new SerializationException(SR.Serialization_InvalidData); 426throw new SerializationException(SR.Serialization_InvalidData); 442throw new SerializationException(SR.Serialization_InvalidData); 459throw new SerializationException(SR.Serialization_InvalidData); 485throw new SerializationException(SR.Serialization_InvalidData, e); 513throw new SerializationException(SR.Serialization_InvalidData); 518throw new SerializationException(SR.Serialization_InvalidData); 525throw new SerializationException(SR.Serialization_InvalidData); 533throw new SerializationException(SR.Serialization_InvalidData); 553throw new SerializationException(SR.Serialization_InvalidData, e); 567throw new SerializationException(SR.Serialization_InvalidData, e); 575throw new SerializationException(SR.Serialization_InvalidData); 605throw new SerializationException(SR.Serialization_InvalidData);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.TransitionTime.cs (7)
75throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecified, nameof(timeOfDay)); 81throw new ArgumentOutOfRangeException(nameof(month), SR.ArgumentOutOfRange_MonthParam); 87throw new ArgumentOutOfRangeException(nameof(day), SR.ArgumentOutOfRange_DayParam); 93throw new ArgumentOutOfRangeException(nameof(week), SR.ArgumentOutOfRange_Week); 99throw new ArgumentOutOfRangeException(nameof(dayOfWeek), SR.ArgumentOutOfRange_DayOfWeek); 105throw new ArgumentException(SR.Argument_DateTimeHasTicks, nameof(timeOfDay)); 125throw new SerializationException(SR.Serialization_InvalidData, e);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (7)
672throw new InvalidTimeZoneException(SR.InvalidTimeZone_NoTTInfoStructures); 840throw new InvalidTimeZoneException(SR.Format(SR.InvalidTimeZone_UnparsablePosixMDateString, date.ToString())); 915throw new InvalidTimeZoneException(SR.InvalidTimeZone_InvalidJulianDay); 930throw new InvalidTimeZoneException(SR.InvalidTimeZone_InvalidJulianDay); 1286throw new ArgumentException(SR.Argument_TimeZoneInfoInvalidTZif, nameof(data)); 1320throw new ArgumentException(SR.Argument_TimeZoneInfoBadTZif, nameof(data));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (9)
37throw new IOException(SR.IO_UnseekableFile); 42throw new IOException(fs.Length == 0 ? SR.IO_InvalidReadLength : SR.IO_FileTooLong); 77e = new TimeZoneNotFoundException(SR.Format(SR.InvalidTimeZone_InvalidId, id)); 127e = new InvalidTimeZoneException(SR.Format(SR.InvalidTimeZone_InvalidFileData, id, timeZoneFilePath), ex); 135e = new InvalidTimeZoneException(SR.Format(SR.InvalidTimeZone_InvalidFileData, id, timeZoneFilePath));
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (17)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 1128throw new ArgumentException(SR.ArgumentException_TupleLastArgumentNotATuple); 1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\libraries\System.Private.CoreLib\src\System\Type.cs (17)
66public virtual bool IsByRefLike { [Intrinsic] get => throw new NotSupportedException(SR.NotSupported_SubclassOverride); } 75public virtual int GetArrayRank() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 77public virtual Type GetGenericTypeDefinition() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 79public virtual Type[] GetGenericArguments() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 84public virtual int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 89throw new InvalidOperationException(SR.Arg_NotGenericParameter); 255public virtual MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 296new ArgumentException(SR.Format(SR.Arg_MemberInfoNotFound, member.Name), nameof(member)); 479throw new ArgumentException(SR.ArgumentNull_ArrayValue, nameof(args)); 591public virtual InterfaceMapping GetInterfaceMap([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] Type interfaceType) => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 602throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 606throw new ArgumentException(SR.Argument_InvalidEnum, "enumType"); 615throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 631public virtual Array GetEnumValuesAsUnderlyingType() => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 641public virtual Type MakeGenericType(params Type[] typeArguments) => throw new NotSupportedException(SR.NotSupported_SubclassOverride); 706public static Type? ReflectionOnlyGetType(string typeName, bool throwIfNotFound, bool ignoreCase) => throw new PlatformNotSupportedException(SR.PlatformNotSupported_ReflectionOnly);
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (9)
25throw new ArgumentException(SR.Arg_MustBeEnum, nameof(value)); 34throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this)); 55throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 62throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 71throw new ArgumentException(SR.Arg_MustBeEnum, nameof(value)); 76throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 93throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (4)
415throw new InvalidFilterCriteriaException(SR.InvalidFilterCriteriaException_CritInt); 430throw new InvalidFilterCriteriaException(SR.InvalidFilterCriteriaException_CritInt); 464throw new InvalidFilterCriteriaException(SR.InvalidFilterCriteriaException_CritInt); 498throw new InvalidFilterCriteriaException(SR.InvalidFilterCriteriaException_CritString);
src\libraries\System.Private.CoreLib\src\System\TypeAccessException.cs (3)
17: base(SR.Arg_TypeAccessException) 23: base(message ?? SR.Arg_TypeAccessException) 29: base(message ?? SR.Arg_TypeAccessException, inner)
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (9)
22throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(flds)); 32throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo); 35throw new ArgumentException(SR.Format(SR.Argument_TypedReferenceInvalidField, field.Name)); 38throw new MissingMemberException(SR.MissingMemberTypeRef); 42throw new ArgumentException(SR.Format(SR.Arg_TypeRefPrimitive, field.Name)); 45throw new MissingMemberException(SR.MissingMemberNestErr); 77throw new NotSupportedException(SR.NotSupported_NYI);
src\libraries\System.Private.CoreLib\src\System\TypeInitializationException.cs (5)
22: base(SR.TypeInitialization_Default) 29: this(fullTypeName, SR.Format(SR.TypeInitialization_Type, fullTypeName), innerException) 35internal TypeInitializationException(string? message) : base(message ?? SR.TypeInitialization_Default) 41: base(message ?? SR.TypeInitialization_Default, innerException)
src\libraries\System.Private.CoreLib\src\System\TypeLoadException.cs (1)
15: base(SR.Arg_TypeLoadException)
src\libraries\System.Private.CoreLib\src\System\TypeUnloadedException.cs (3)
15: base(SR.Arg_TypeUnloadedException) 21: base(message ?? SR.Arg_TypeUnloadedException) 27: base(message ?? SR.Arg_TypeUnloadedException, innerException)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
62throw new ArgumentException(SR.Arg_MustBeUInt128);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (4)
63throw new ArgumentException(SR.Arg_MustBeUInt16); 246throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt16", "DateTime")); 1228static string IBinaryIntegerParseAndFormatInfo<ushort>.OverflowMessage => SR.Overflow_UInt16;
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (4)
69throw new ArgumentException(SR.Arg_MustBeUInt32); 256throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt32", "DateTime")); 1267static string IBinaryIntegerParseAndFormatInfo<uint>.OverflowMessage => SR.Overflow_UInt32;
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (4)
69throw new ArgumentException(SR.Arg_MustBeUInt64); 255throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt64", "DateTime")); 1260static string IBinaryIntegerParseAndFormatInfo<ulong>.OverflowMessage => SR.Overflow_UInt64;
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
189throw new ArgumentException(SR.Arg_MustBeUIntPtr);
src\libraries\System.Private.CoreLib\src\System\UnauthorizedAccessException.cs (3)
18: base(SR.Arg_UnauthorizedAccessException) 24: base(message ?? SR.Arg_UnauthorizedAccessException) 30: base(message ?? SR.Arg_UnauthorizedAccessException, inner)
src\libraries\System.Private.CoreLib\src\System\UnitySerializationHolder.cs (3)
45throw new NotSupportedException(SR.NotSupported_UnitySerHolder); 52throw new ArgumentException(SR.Format(SR.Argument_InvalidUnity, _data ?? "UnityType"));
src\libraries\System.Private.CoreLib\src\System\ValueTuple.cs (1)
1856throw new ArgumentException(SR.ArgumentException_ValueTupleLastArgumentNotAValueTuple);
src\libraries\System.Private.CoreLib\src\System\Version.cs (5)
123throw new ArgumentException(SR.Arg_MustBeVersion, nameof(version)); 222throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, "0", failureUpperBound), nameof(fieldCount)); 313if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input)); 330if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input));
src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (1)
191throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
src\libraries\System.Private.CoreLib\src\System\WeakReference.T.cs (1)
105throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\AssemblyNameInfo.cs (1)
181: throw new ArgumentException(SR.InvalidAssemblyName, nameof(assemblyName));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (1)
174throw new IO.FileLoadException(SR.InvalidAssemblyName, _inputString.ToString());
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
334throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
src\System\ArgIterator.cs (9)
161throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 167throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 172throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 177throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 182throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 188throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 194throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 199throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317 204throw new PlatformNotSupportedException(SR.PlatformNotSupported_ArgIterator); // https://github.com/dotnet/runtime/issues/7317
src\System\Array.CoreCLR.cs (7)
46throw new RankException(SR.Rank_MustMatch); 61throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 63throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 86throw new ArrayTypeMismatchException(SR.ArrayTypeMismatch_ConstrainedCopy); 584throw new IndexOutOfRangeException(SR.IndexOutOfRange_ArrayRankIndex); 597throw new IndexOutOfRangeException(SR.IndexOutOfRange_ArrayRankIndex); 611throw new IndexOutOfRangeException(SR.IndexOutOfRange_ArrayRankIndex);
src\System\Attribute.CoreCLR.cs (13)
433SR.Format(SR.Format_AttributeUsage, type)); 456throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 495throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 543throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 546throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element)); 560throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element)); 582throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 599throw new ArgumentException(SR.Argument_InvalidParamInfo); 650throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 668throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 708throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 738throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (10)
41throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 46throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index)); 71throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 88throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 93throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 107throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 123public object? Current => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 131public object Key => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 133public object? Value => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 135public DictionaryEntry Entry => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
src\System\Delegate.CoreCLR.cs (22)
51throw new ArgumentException(SR.Arg_DlgtTargMeth); 63throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target)); 65throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target)); 223throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 225throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 242throw new ArgumentException(SR.Arg_DlgtTargMeth); 258throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target)); 260throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 262throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target)); 265throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 278throw new ArgumentException(SR.Arg_DlgtTargMeth); 293throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 296throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 299throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 316throw new ArgumentException(SR.Arg_DlgtTargMeth); 328throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 331throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 334throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 348throw new ArgumentException(SR.Arg_DlgtTargMeth); 366throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 369throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 382throw new ArgumentException(SR.Arg_DlgtTargMeth);
src\System\Environment.CoreCLR.cs (1)
110internal static string? GetResourceStringLocal(string key) => SR.GetResourceString(key);
src\System\GC.CoreCLR.cs (24)
81SR.Format( 82SR.ArgumentOutOfRange_Bounds_Lower_Upper, 197throw new ArgumentOutOfRangeException(nameof(mode), SR.ArgumentOutOfRange_Enum); 212throw new ArgumentException(SR.Argument_AggressiveGCRequiresMaxGeneration, nameof(generation)); 216throw new ArgumentException(SR.Argument_AggressiveGCRequiresBlocking, nameof(blocking)); 220throw new ArgumentException(SR.Argument_AggressiveGCRequiresCompacting, nameof(compacting)); 408SR.Format( 409SR.ArgumentOutOfRange_Bounds_Lower_Upper, 417SR.Format( 418SR.ArgumentOutOfRange_Bounds_Lower_Upper, 425throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 433throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 493throw new InvalidOperationException(SR.InvalidOperationException_AlreadyInNoGCRegion); 495throw new ArgumentOutOfRangeException(nameof(totalSize), SR.ArgumentOutOfRangeException_NoGCRegionSizeTooLarge); 526throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionNotInProgress); 528throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionInduced); 530throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionAllocationExceeded); 683throw new InvalidOperationException(SR.Format(SR.InvalidOperationException_NoGCRegionNotInProgress)); 685throw new InvalidOperationException(SR.Format(SR.InvalidOperationException_NoGCRegionAllocationExceeded)); 687throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionCallbackAlreadyRegistered); 942throw new InvalidOperationException(SR.InvalidOperationException_HardLimitTooLow); 944throw new InvalidOperationException(SR.InvalidOperationException_HardLimitInvalid);
src\System\IO\FileLoadException.CoreCLR.cs (1)
27message = SR.Arg_BadImageFormatException;
src\System\MulticastDelegate.CoreCLR.cs (3)
39throw new SerializationException(SR.Serialization_DelegatesNotSupported); 218throw new ArgumentException(SR.Arg_DlgtTypeMis); 543throw new ArgumentException(SR.Arg_DlgtNullInst);
src\System\Reflection\Assembly.CoreCLR.cs (1)
32throw new ArgumentException(SR.Format_StringZeroLength, nameof(partialName));
src\System\Reflection\Emit\CustomAttributeBuilder.cs (20)
68throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedProperties, propertyValues"); 70throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedFields, fieldValues"); 75throw new ArgumentException(SR.Argument_BadConstructor); 78throw new ArgumentException(SR.Argument_BadConstructorCallConv); 93throw new ArgumentException(SR.Argument_BadParameterCountsForConstructor); 98throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 145throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 149throw new ArgumentException(SR.Argument_NotAWritableProperty); 167throw new ArgumentException(SR.Argument_BadPropertyForConstructorBuilder); 203throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 221throw new ArgumentException(SR.Argument_BadFieldForConstructorBuilder); 284throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 288throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, passedType), paramName); 434throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeForCA, value.GetType())); 507throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, ot)); 519throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, typename));
src\System\Reflection\Emit\DynamicILGenerator.cs (25)
44throw new ArgumentException(SR.Argument_MustBeRuntimeType); 69throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(meth)); 82throw new ArgumentException(SR.Argument_InvalidOpCodeOnDynamicMethod); 117throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(con)); 143throw new ArgumentException(SR.Argument_MustBeRuntimeType); 157throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(field)); 194throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 260throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 263throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo)); 266throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo)); 331throw new NotSupportedException(SR.Argument_NotInExceptionBlock); 345throw new NotSupportedException(SR.Argument_NotInExceptionBlock); 355throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 368throw new ArgumentException(SR.Argument_MustBeRuntimeType); 391throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod); 396throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod); 401throw new NotSupportedException(SR.InvalidOperation_NotAllowedInDynamicMethod); 411throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 417throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(methodInfo)); 484throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(parameterTypes))); 487throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(parameterTypes))); 1036throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGenericLcg, m, t));
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (4)
78throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadEmptyMethodBody, Name)); 120throw new NotSupportedException(SR.NotSupported_CallToVarArg); 134throw new TargetParameterCountException(SR.Arg_ParmCnt);
src\System\Reflection\Emit\RuntimeAssemblyBuilder.cs (4)
45throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)access), nameof(access)); 190throw new ArgumentException(SR.Argument_InvalidName, nameof(name)); 198throw new InvalidOperationException(SR.InvalidOperation_NoMultiModuleAssembly);
src\System\Reflection\Emit\RuntimeConstructorBuilder.cs (3)
78throw new NotSupportedException(SR.NotSupported_DynamicModule); 101throw new NotSupportedException(SR.NotSupported_DynamicModule); 139throw new InvalidOperationException(SR.InvalidOperation_DefaultConstructorILGen);
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (2)
162throw new NotSupportedException(SR.NotSupported_DynamicModule); 307throw new ArgumentException(SR.Argument_ShouldOnlySetVisibilityFlags, nameof(name));
src\System\Reflection\Emit\RuntimeFieldBuilder.cs (9)
24throw new ArgumentException(SR.Argument_IllegalName, nameof(fieldName)); 27throw new ArgumentException(SR.Argument_BadFieldType); 94throw new NotSupportedException(SR.NotSupported_DynamicModule); 103throw new NotSupportedException(SR.NotSupported_DynamicModule); 106public override RuntimeFieldHandle FieldHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule); 115throw new NotSupportedException(SR.NotSupported_DynamicModule); 120throw new NotSupportedException(SR.NotSupported_DynamicModule); 125throw new NotSupportedException(SR.NotSupported_DynamicModule); 147throw new ArgumentException(SR.Argument_ConstantNull);
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (2)
200public override Type MakeGenericType(params Type[] typeArguments) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\System\Reflection\Emit\RuntimeILGenerator.cs (24)
190throw new ArgumentException(SR.Argument_UnclosedExceptionBlock); 217throw new NotSupportedException(SR.Format(SR.NotSupported_IllegalOneByteBranch, fixupData.m_fixupPos, updateAddr)); 236throw new NotSupportedException(SR.Argument_UnclosedExceptionBlock); 281throw new ArgumentException(SR.Argument_BadLabel); 285throw new ArgumentException(SR.Argument_BadLabelContent); 313throw new ArgumentException(SR.Argument_BadLabel); 523throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 604throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 825throw new ArgumentException(SR.Argument_UnmatchedMethodForLocal, nameof(local)); 894throw new InvalidOperationException(SR.InvalidOperation_BadInstructionOrIndexOutOfBound); 949throw new NotSupportedException(SR.Argument_NotInExceptionBlock); 962throw new InvalidOperationException(SR.Argument_BadExceptionCodeGen); 991throw new NotSupportedException(SR.Argument_NotInExceptionBlock); 1009throw new NotSupportedException(SR.Argument_NotInExceptionBlock); 1017throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 1040throw new NotSupportedException(SR.Argument_NotInExceptionBlock); 1057throw new NotSupportedException(SR.Argument_NotInExceptionBlock); 1123throw new ArgumentException(SR.Argument_InvalidLabel); 1128throw new ArgumentException(SR.Argument_RedefinedLabel); 1175throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 1182throw new InvalidOperationException(SR.InvalidOperation_MethodBaked); 1362throw new ArgumentException(SR.Argument_TooManyFinallyClause); 1544throw new ArgumentException(SR.Argument_UnmatchingSymScope);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (16)
67throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 93throw new ArgumentException(SR.Arg_NoStaticVirtual); 155throw new InvalidOperationException(SR.InvalidOperation_MethodHasBody); 164throw new InvalidOperationException(SR.InvalidOperation_BadILGeneratorUsage); 172throw new InvalidOperationException(SR.InvalidOperation_OpenLocalVariableScope); 428throw new NotSupportedException(SR.NotSupported_DynamicModule); 440public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule); 460throw new NotSupportedException(SR.InvalidOperation_TypeNotCreated); 472throw new InvalidOperationException(SR.InvalidOperation_TypeNotCreated); 484throw new NotSupportedException(SR.NotSupported_DynamicModule); 489throw new NotSupportedException(SR.NotSupported_DynamicModule); 494throw new NotSupportedException(SR.NotSupported_DynamicModule); 520throw new InvalidOperationException(SR.InvalidOperation_GenericParametersAlreadySet); 523throw new InvalidOperationException(SR.InvalidOperation_MethodBuilderBaked); 647throw new ArgumentOutOfRangeException(SR.ArgumentOutOfRange_ParamSequence); 683throw new InvalidOperationException(SR.InvalidOperation_ShouldNotHaveMethodBody);
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (15)
85throw new ArgumentException(SR.Argument_DuplicateTypeName); 258throw new ArgumentException(SR.Argument_InvalidConstructorInfo); 269throw new ArgumentException(SR.Argument_InvalidConstructorInfo); 328throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 787throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 812throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 817throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 832throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 852throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 869throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 977throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1003throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1144throw new ArgumentException(SR.Argument_HasToBeArrayClass); 1205throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1217throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule);
src\System\Reflection\Emit\RuntimePropertyBuilder.cs (10)
38throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 113throw new NotSupportedException(SR.NotSupported_DynamicModule); 118throw new NotSupportedException(SR.NotSupported_DynamicModule); 123throw new NotSupportedException(SR.NotSupported_DynamicModule); 128throw new NotSupportedException(SR.NotSupported_DynamicModule); 133throw new NotSupportedException(SR.NotSupported_DynamicModule); 158throw new NotSupportedException(SR.NotSupported_DynamicModule); 177throw new NotSupportedException(SR.NotSupported_DynamicModule); 182throw new NotSupportedException(SR.NotSupported_DynamicModule); 187throw new NotSupportedException(SR.NotSupported_DynamicModule);
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (58)
221throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 230throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 240throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 249throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 286throw new ArgumentException(SR.Format(SR.Argument_ConstantNotSupported, type)); 384throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 387throw new ArgumentException(SR.Argument_TypeNameTooLong, nameof(name)); 402throw new ArgumentException(SR.Argument_BadNestedTypeFlags, nameof(attr)); 475throw new ArgumentException(SR.Argument_BadSizeForData); 510throw new ArgumentException(SR.Argument_BadTypeAttrNestedVisibilityOnNonNestedType); 518throw new ArgumentException(SR.Argument_BadTypeAttrNonNestedVisibilityNestedType); 525throw new ArgumentException(SR.Argument_BadTypeAttrInvalidLayout); 531throw new ArgumentException(SR.Argument_BadTypeAttrReservedBitsSet); 558throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 633throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 644throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 651public override RuntimeTypeHandle TypeHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule); 666throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 675throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 685throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 701throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 710throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 719throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 729throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 754throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 763throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 772throw new NotSupportedException(SR.NotSupported_DynamicModule); 779throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 788throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 797throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 806throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 814throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 823throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 832throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 923throw new NotSupportedException(SR.NotSupported_DynamicModule); 967throw new InvalidOperationException(SR.InvalidOperation_NoUnderlyingTypeOnEnum); 984throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 992throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 997throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1005throw new NotSupportedException(SR.NotSupported_TypeNotYetCreated); 1010throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1074throw new ArgumentException(SR.ArgumentException_BadMethodImplBody); 1126throw new ArgumentException(SR.Argument_BadPInvokeMethod); 1129throw new ArgumentException(SR.Argument_BadPInvokeOnInterface); 1145throw new ArgumentException(SR.Argument_MethodRedefined); 1223throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 1256throw new NotSupportedException(SR.NotSupported_DynamicModule); 1271throw new NotSupportedException(SR.NotSupported_NoParentDefaultConstructor); 1291throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 1435throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 1602throw new InvalidOperationException(SR.InvalidOperation_BadTypeAttributesNotAbstract); 1617throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadMethodBody, meth.Name)); 1632SR.Format(SR.InvalidOperation_BadEmptyMethodBody, meth.Name)); 1692throw new ArgumentException(SR.Argument_CannotSetParentToInterface); 1705throw new InvalidOperationException(SR.InvalidOperation_BadInterfaceNotAbstract);
src\System\Reflection\Emit\SignatureHelper.cs (21)
101throw new ArgumentException(SR.Argument_UnknownUnmanagedCallConv, nameof(unmanagedCallConv)); 196throw new ArgumentException(SR.Argument_BadFieldSig); 225throw new ArgumentException(SR.NotSupported_MustBeModuleBuilder); 285throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers)); 288throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers)); 307throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers)); 310throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers)); 487throw new ArgumentException(SR.Argument_LargeInteger); 512throw new ArgumentException(SR.Argument_LargeInteger); 723throw new ArgumentException(SR.Argument_LargeInteger); 745throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(optionalCustomModifiers)); 748throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers)); 751throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers)); 768throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(requiredCustomModifiers)); 771throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers)); 774throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers)); 806throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(arguments))); 809throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(arguments))); 823throw new ArgumentException(SR.Argument_SigIsFinalized);
src\System\Reflection\Emit\SymbolMethod.cs (8)
84throw new NotSupportedException(SR.NotSupported_SymbolMethod); 89throw new NotSupportedException(SR.NotSupported_SymbolMethod); 92public override MethodAttributes Attributes => throw new NotSupportedException(SR.NotSupported_SymbolMethod); 96public override RuntimeMethodHandle MethodHandle => throw new NotSupportedException(SR.NotSupported_SymbolMethod); 107throw new NotSupportedException(SR.NotSupported_SymbolMethod); 119throw new NotSupportedException(SR.NotSupported_SymbolMethod); 124throw new NotSupportedException(SR.NotSupported_SymbolMethod); 129throw new NotSupportedException(SR.NotSupported_SymbolMethod);
src\System\Reflection\FieldInfo.CoreCLR.cs (4)
11throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle)); 17throw new ArgumentException(SR.Format( 18SR.Argument_FieldDeclaringTypeGeneric, 27throw new ArgumentException(SR.Argument_InvalidHandle);
src\System\Reflection\MdConstant.cs (3)
71throw new FormatException(SR.Arg_BadLiteralFormat); 100throw new FormatException(SR.Arg_BadLiteralFormat); 125_ => throw new FormatException(SR.Arg_BadLiteralFormat),
src\System\Reflection\MdFieldInfo.cs (3)
78throw new FieldAccessException(SR.Acc_ReadOnly); 97throw new NotSupportedException(SR.Arg_EnumLitValueNotFound); 106throw new FieldAccessException(SR.Acc_ReadOnly);
src\System\Reflection\Metadata\MetadataUpdater.cs (1)
41throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
src\System\Reflection\MethodBase.CoreCLR.cs (4)
18throw new ArgumentException(SR.Argument_InvalidHandle); 24throw new ArgumentException(SR.Format( 25SR.Argument_MethodDeclaringTypeGeneric, 34throw new ArgumentException(SR.Argument_InvalidHandle);
src\System\Reflection\RtFieldInfo.cs (2)
93throw new ArgumentException(SR.Arg_TypedReference_Null); 111throw new ArgumentException(SR.Arg_TypedReference_Null);
src\System\Reflection\RuntimeAssembly.cs (10)
103throw new NotSupportedException(SR.NotSupported_DynamicAssembly); 110throw new NotSupportedException(SR.NotSupported_CodeBase); 240throw new TypeLoadException(SR.Format(SR.ClassLoad_General /* TypeLoad_TypeNotFoundInAssembly */, typeName, FullName)); 344throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 354throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 446throw new FileNotFoundException(SR.IO_NoFileTableInInMemoryAssemblies); 464throw new FileNotFoundException(SR.IO_NoFileTableInInMemoryAssemblies); 677throw new FileNotFoundException(SR.Format(culture, SR.IO_FileNotFound_FileName, an.Name));
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (2)
139throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 149throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeCustomAttributeData.cs (10)
179throw new ArgumentException(SR.Argument_InvalidKindOfTypeForCA, nameof(type)); 521_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)encodedType), nameof(encodedType)), 541_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, val.Byte8), nameof(val)) 682throw new BadImageFormatException(SR.Arg_CustomAttributeFormatException); 734throw new BadImageFormatException(SR.Arg_CustomAttributeFormatException); 745throw new BadImageFormatException(SR.Arg_CustomAttributeFormatException); 795throw new BadImageFormatException(SR.Arg_CustomAttributeUnknownNamedArgument); 800throw new BadImageFormatException(SR.Arg_CustomAttributeDuplicateNamedArgument);
src\System\Reflection\RuntimeEventInfo.cs (3)
70throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod); 99throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 109throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeExceptionHandlingClause.cs (2)
34throw new InvalidOperationException(SR.Arg_EHClauseNotFilter); 50throw new InvalidOperationException(SR.Arg_EHClauseNotClause);
src\System\Reflection\RuntimeFieldInfo.cs (2)
70throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 80throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (8)
182throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 192throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 306throw new TargetParameterCountException(SR.Arg_ParmCnt); 385throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(delegateType)); 388throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(delegateType)); 393throw new ArgumentException(SR.Arg_DlgtTargMeth); 411SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\System\Reflection\RuntimeModule.cs (42)
38throw new ArgumentException(SR.Argument_InvalidGenericInstArray); 41throw new ArgumentException(SR.Argument_InvalidGenericInstArray); 43throw new ArgumentException(SR.Argument_InvalidGenericInstArray); 56SR.Format(SR.Argument_InvalidToken, tk, this)); 59throw new ArgumentException(SR.Format(SR.Argument_InvalidToken, tk, this), 85throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 93throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 128throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e); 139SR.Format(SR.Argument_InvalidToken, tk, this)); 156throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), nameof(metadataToken)); 169SR.Format(SR.Argument_InvalidToken, tk, this)); 186throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 194throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 217throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e); 229throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken)); 232throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken)); 249throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e); 259throw new ArgumentException(SR.InvalidOperation_PropertyInfoNotAvailable); 262throw new ArgumentException(SR.InvalidOperation_EventInfoNotAvailable); 277SR.Format(SR.Argument_InvalidToken, tk, this)); 294throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, this), 304SR.Format(SR.Argument_ResolveString, metadataToken, this)); 308SR.Format(SR.Argument_InvalidToken, tk, this)); 314SR.Format(SR.Argument_ResolveString, metadataToken, this)); 370throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 380throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeParameterInfo.cs (5)
60throw new BadImageFormatException(SR.BadImageFormat_ParameterSignatureMismatch); 75throw new BadImageFormatException(SR.BadImageFormat_ParameterSignatureMismatch); 83throw new BadImageFormatException(SR.BadImageFormat_ParameterSignatureMismatch); 468throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 484throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimePropertyInfo.cs (5)
147throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 157throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 219throw new InvalidOperationException(SR.Arg_EnumLitValueNotFound); 338throw new ArgumentException(SR.Arg_GetMethNotFnd); 361throw new ArgumentException(SR.Arg_SetMethNotFnd);
src\System\Reflection\TypeNameResolver.CoreCLR.cs (15)
55throw new TypeLoadException(SR.Arg_TypeLoadNullStr); 91return throwOnError ? throw new ArgumentException(SR.Argument_AssemblyGetTypeCannotSpecifyAssembly) : null; 140throw new TypeLoadException(SR.Arg_TypeLoadNullStr); 172throw new FileNotFoundException(SR.Format(SR.FileNotFound_ResolveAssembly, assemblyName)); 215SR.Format(SR.TypeLoad_ResolveType, escapedTypeName) : 216SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, escapedTypeName, assembly.FullName)); 229throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveType, escapedTypeName)); 270throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveNestedType, 307throw new TypeLoadException(SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, parsedName.FullName, (requestingAssembly ?? coreLib).FullName));
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (11)
74throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(type)); 94throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(module)); 111throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(method)); 215throw new SerializationException(SR.Format(SR.Serialization_InvalidType, type)); 362throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 437throw new ArgumentException(SR.Arg_TypeNotSupported); 442throw new ArgumentException(SR.Arg_TypeNotSupported); 447throw new NotSupportedException(SR.NotSupported_ByRefLike); 450throw new ArgumentException(SR.Arg_TypeNotSupported); 483throw new ArgumentException(SR.Arg_TypeNotSupported);
src\System\Runtime\ControlledExecution.CoreCLR.cs (1)
51throw new InvalidOperationException(SR.InvalidOperation_NestedControlledExecutionRun);
src\System\Runtime\InteropServices\ComWrappers.cs (3)
297throw new InvalidOperationException(SR.InvalidOperation_SuppliedInnerMustBeMarkedAggregation); 329throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance); 360throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance);
src\System\Runtime\InteropServices\DynamicInterfaceCastableHelpers.cs (10)
20throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType)); 30throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType)); 34throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_NotInterface, implType.ToString())); 37throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_MissingImplementationAttribute, implType, nameof(DynamicInterfaceCastableImplementationAttribute))); 40throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_DoesNotImplementRequested, implType, interfaceType));
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (11)
44throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, t.FullName), nameof(fieldName)); 49throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(fieldName)); 218throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(m)); 251throw new ArgumentException(SR.Argument_NeedNonGenericObject, nameof(structure)); 256throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure)); 281throw new ArgumentException(SR.Argument_StructMustNotBeValueClass, nameof(structure)); 286throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure)); 310throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structuretype)); 313throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structuretype)); 318throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structuretype));
src\System\RuntimeHandles.cs (12)
26throw new ArgumentNullException(null, SR.Arg_InvalidHandle); 36throw new ArgumentNullException(null, SR.Arg_InvalidHandle); 621throw new InvalidOperationException(SR.Arg_NotGenericParameter); 750throw new ArgumentNullException(null, SR.Arg_InvalidHandle); 1096throw new ArgumentNullException(null, SR.Arg_InvalidHandle); 1289static void ThrowInvalidOperationException() => throw new InvalidOperationException(SR.InvalidOperation_NullModuleHandle); 1332SR.Format(SR.Argument_InvalidToken, typeToken, new ModuleHandle(module))); 1385SR.Format(SR.Argument_InvalidToken, methodToken, new ModuleHandle(module))); 1438SR.Format(SR.Argument_InvalidToken, fieldToken, new ModuleHandle(module)));
src\System\RuntimeType.ActivatorCache.cs (2)
59string friendlyMessage = SR.Format(SR.Activator_CannotCreateInstance, rt, ex.Message);
src\System\RuntimeType.CoreCLR.cs (37)
1849throw new ArgumentException(SR.Format( 1850SR.Argument_ResolveMethodHandle, 1877throw new ArgumentException(SR.Format( 1878SR.Argument_ResolveMethodHandle, 1899throw new ArgumentException(SR.Format( 1900SR.Argument_ResolveMethodHandle, 1961throw new ArgumentException(SR.Format( 1962SR.Argument_ResolveFieldHandle, 2026SR.Format(SR.Argument_GenConstraintViolation, i.ToString(), genericArgument, definition, genericParameter), e); 2718throw new InvalidOperationException(SR.Arg_GenericParameter); 2725throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(interfaceType)); 2736throw new ArgumentException(SR.Argument_ArrayGetInterfaceMap); 3259throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3498throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 3508throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3546throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 3550throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(instantiation)); 3619throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3631throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3713throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 3724throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 3742throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 3772throw new ArgumentException(SR.Format(SR.Acc_CreateGenericEx, this)); 3777throw new NotSupportedException(SR.Acc_CreateArgIterator); 3780throw new NotSupportedException(SR.Acc_CreateVoid); 3830throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName)); 3849throw new MissingMethodException(SR.Format(SR.MissingConstructor_Name, FullName)); 3858throw new NotSupportedException(SR.NotSupported_CallToVarArg); 3925throw new MissingMethodException(SR.Format(SR.Arg_NoDefCTor, this)); 3958throw new MissingMethodException(SR.Format(SR.Arg_NoDefCTor, this));
src\System\StubHelpers.cs (9)
167throw new ArgumentException(SR.Interop_Marshal_Unmappable_Char); 506throw new InvalidOperationException(SR.Interop_Marshal_SafeHandle_InvalidOperation); 516throw new NotSupportedException(SR.Interop_Marshal_CannotCreateSafeHandleField); 521throw new NotSupportedException(SR.Interop_Marshal_CannotCreateCriticalHandleField); 692throw new ArgumentException(SR.Argument_WrongSizeArrayInNativeStruct); 949throw new ArgumentException(SR.Arg_NDirectBadObject); 1127throw new ArgumentException(SR.Arg_MarshalAsAnyRestriction); 1156throw new ArgumentException(SR.Arg_NDirectBadObject); 1524throw new MarshalDirectiveException(SR.Marshaler_StringTooLong);
src\System\Threading\Monitor.CoreCLR.cs (1)
54throw new ArgumentException(SR.Argument_MustBeFalse, "lockTaken");
src\System\Threading\Mutex.CoreCLR.Unix.cs (7)
25throw new ArgumentException(SR.Argument_WaitHandleNameTooLong, nameof(name)); 27throw new WaitHandleCannotBeOpenedException(SR.Format(SR.Threading_WaitHandleCannotBeOpenedException_InvalidHandle, name)); 54throw new ArgumentException(SR.Argument_WaitHandleNameTooLong, nameof(name)); 77throw new ApplicationException(SR.Arg_SynchronizationLockException); 121SR.Format(SR.Unix_SystemCallErrors, Encoding.UTF8.GetString(systemCallErrors, systemCallErrorsLength));
src\System\Threading\Thread.CoreCLR.cs (2)
77throw new ArgumentException(null, SR.Argument_InvalidHandle); 303throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
src\System\Threading\WaitHandle.CoreCLR.cs (1)
31throw new InvalidOperationException(SR.Threading_WaitHandleTooManyPosts);
src\System\TypeLoadException.CoreCLR.cs (3)
35_message = SR.Arg_TypeLoadException; 39_assemblyName ??= SR.IO_UnknownFileName; 40_className ??= SR.IO_UnknownFileName;