XmlParserExtensions
Extensions to be used exclusively by the parser or the tokenizer.
namespace AngleSharp.Parser.Xml
{
internal static class XmlParserExtensions
{
public static XmlParseException At(this XmlParseError code, TextPosition position)
{
string message = "Error while parsing the provided XML document.";
return new XmlParseException(code.GetCode(), message, position);
}
public static int GetCode(this XmlParseError code)
{
return (int)code;
}
}
}