RustDedicated/System.Numerics/SR.cs
2025-05-25 05:29:54 +09:30

98 lines
3.4 KiB
C#

using System.Globalization;
internal static class SR
{
public const string Argument_BadFormatSpecifier = "Format specifier was invalid.";
public const string Argument_InvalidNumberStyles = "An undefined NumberStyles value is being used.";
public const string Argument_InvalidHexStyle = "With the AllowHexSpecifier bit set in the enum bit field, the only other valid bits that can be combined into the enum value must be a subset of those in HexNumber.";
public const string Argument_MustBeBigInt = "The parameter must be a BigInteger.";
public const string Format_TooLarge = "The value is too large to be represented by this format specifier.";
public const string ArgumentOutOfRange_MustBeNonNeg = "The number must be greater than or equal to zero.";
public const string Overflow_BigIntInfinity = "BigInteger cannot represent infinity.";
public const string Overflow_NotANumber = "The value is not a number.";
public const string Overflow_ParseBigInteger = "The value could not be parsed.";
public const string Overflow_Int32 = "Value was either too large or too small for an Int32.";
public const string Overflow_Int64 = "Value was either too large or too small for an Int64.";
public const string Overflow_UInt32 = "Value was either too large or too small for a UInt32.";
public const string Overflow_UInt64 = "Value was either too large or too small for a UInt64.";
public const string Overflow_Decimal = "Value was either too large or too small for a Decimal.";
public const string Arg_ArgumentOutOfRangeException = "Index was out of bounds:";
public const string Arg_ElementsInSourceIsGreaterThanDestination = "Number of elements in source vector is greater than the destination array";
public const string Arg_NullArgumentNullRef = "The method was called with a null array argument.";
public const string Arg_TypeNotSupported = "Specified type is not supported";
public const string ArgumentException_BufferNotFromPool = "The buffer is not associated with this pool and may not be returned to it.";
public const string Overflow_Negative_Unsigned = "Negative values do not have an unsigned representation.";
internal static string GetString(string name, params object[] args)
{
return GetString(CultureInfo.InvariantCulture, name, args);
}
internal static string GetString(CultureInfo culture, string name, params object[] args)
{
return string.Format(culture, name, args);
}
internal static string GetString(string name)
{
return name;
}
internal static string GetString(CultureInfo culture, string name)
{
return name;
}
internal static string Format(string resourceFormat, params object[] args)
{
if (args != null)
{
return string.Format(CultureInfo.InvariantCulture, resourceFormat, args);
}
return resourceFormat;
}
internal static string Format(string resourceFormat, object p1)
{
return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1);
}
internal static string Format(string resourceFormat, object p1, object p2)
{
return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2);
}
internal static string Format(CultureInfo ci, string resourceFormat, object p1, object p2)
{
return string.Format(ci, resourceFormat, p1, p2);
}
internal static string Format(string resourceFormat, object p1, object p2, object p3)
{
return string.Format(CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
}
internal static string GetResourceString(string str)
{
return str;
}
}