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

120 lines
4.8 KiB
C#

using System.Globalization;
internal static class SR
{
public const string Argument_AddAttribute = "An attribute cannot be added to content.";
public const string Argument_AddNode = "A node of type {0} cannot be added to content.";
public const string Argument_AddNonWhitespace = "Non-whitespace characters cannot be added to content.";
public const string Argument_ConvertToString = "The argument cannot be converted to a string.";
public const string Argument_InvalidExpandedName = "'{0}' is an invalid expanded name.";
public const string Argument_InvalidPIName = "'{0}' is an invalid name for a processing instruction.";
public const string Argument_InvalidPrefix = "'{0}' is an invalid prefix.";
public const string Argument_MustBeDerivedFrom = "The argument must be derived from {0}.";
public const string Argument_NamespaceDeclarationPrefixed = "The prefix '{0}' cannot be bound to the empty namespace name.";
public const string Argument_NamespaceDeclarationXml = "The prefix 'xml' is bound to the namespace name 'http://www.w3.org/XML/1998/namespace'. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace.";
public const string Argument_NamespaceDeclarationXmlns = "The prefix 'xmlns' is bound to the namespace name 'http://www.w3.org/2000/xmlns/'. It must not be declared. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace.";
public const string Argument_XObjectValue = "An XObject cannot be used as a value.";
public const string InvalidOperation_DeserializeInstance = "This instance cannot be deserialized.";
public const string InvalidOperation_DocumentStructure = "This operation would create an incorrectly structured document.";
public const string InvalidOperation_DuplicateAttribute = "Duplicate attribute.";
public const string InvalidOperation_ExpectedEndOfFile = "The XmlReader state should be EndOfFile after this operation.";
public const string InvalidOperation_ExpectedInteractive = "The XmlReader state should be Interactive.";
public const string InvalidOperation_ExpectedNodeType = "The XmlReader must be on a node of type {0} instead of a node of type {1}.";
public const string InvalidOperation_ExternalCode = "This operation was corrupted by external code.";
public const string InvalidOperation_MissingAncestor = "A common ancestor is missing.";
public const string InvalidOperation_MissingParent = "The parent is missing.";
public const string InvalidOperation_MissingRoot = "The root element is missing.";
public const string InvalidOperation_UnexpectedNodeType = "The XmlReader should not be on a node of type {0}.";
public const string InvalidOperation_UnresolvedEntityReference = "The XmlReader cannot resolve entity references.";
public const string InvalidOperation_WriteAttribute = "An attribute cannot be written after content.";
public const string NotSupported_WriteBase64 = "This XmlWriter does not support base64 encoded data.";
public const string NotSupported_WriteEntityRef = "This XmlWriter does not support entity references.";
public const string Argument_CreateNavigator = "This XPathNavigator cannot be created on a node of type {0}.";
public const string InvalidOperation_BadNodeType = "This operation is not valid on a node of type {0}.";
public const string InvalidOperation_UnexpectedEvaluation = "The XPath expression evaluated to unexpected type {0}.";
public const string NotSupported_MoveToId = "This XPathNavigator does not support IDs.";
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;
}
}