本文整理汇总了C#中IXmlLineInfo类的典型用法代码示例。如果您正苦于以下问题:C# IXmlLineInfo类的具体用法?C# IXmlLineInfo怎么用?C# IXmlLineInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IXmlLineInfo类属于命名空间,在下文中一共展示了IXmlLineInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConfigError
private void ConfigError (IXmlLineInfo lineInfo, string message, params object [] args)
{
Console.Error.WriteLine ("Analyzer Configuration Error: {0} ({1}:{2},{3})",
String.Format (message, args), configuration_path,
lineInfo.LineNumber, lineInfo.LinePosition);
throw new Exception ();
}
示例2: XmlException
internal XmlException(string res, string[] args, IXmlLineInfo lineInfo) {
HResult = HResults.Xml;
this.res = res;
this.args = args;
this.lineNumber = null == lineInfo ? 0 : lineInfo.LineNumber;
this.linePosition = null == lineInfo ? 0 : lineInfo.LinePosition;
}
示例3: XPathDocumentBuilder
public XPathDocumentBuilder(XPathDocument doc, IXmlLineInfo lineInfo, string baseUri, XPathDocument.LoadFlags flags)
{
this.nodePageFact.Init(0x100);
this.nmspPageFact.Init(0x10);
this.stkNmsp = new Stack<XPathNodeRef>();
this.Initialize(doc, lineInfo, baseUri, flags);
}
示例4: CreateParseException
protected virtual Exception CreateParseException(IXmlLineInfo lineInfo, string format, params object[] args) {
if (lineInfo != null && lineInfo.HasLineInfo())
return new HttpParseException(String.Format(CultureInfo.InvariantCulture, format, args), null, this.VirtualPath, null, lineInfo.LineNumber);
else
return new HttpParseException(String.Format(CultureInfo.InvariantCulture, format, args));
}
示例5: SetIdentityField
// Return false if there is already the same key.
public bool SetIdentityField (object identity, bool isXsiNil, XsdAnySimpleType type, int depth, IXmlLineInfo li)
{
FieldFoundDepth = depth;
Identity = identity;
IsXsiNil = isXsiNil;
FieldFound |= isXsiNil;
FieldType = type;
Consuming = false;
Consumed = true;
if (li != null && li.HasLineInfo ()) {
FieldHasLineInfo = true;
FieldLineNumber = li.LineNumber;
FieldLinePosition = li.LinePosition;
}
if (!(this.entry.OwnerSequence.SourceSchemaIdentity is XmlSchemaKeyref)) {
for (int i = 0; i < entry.OwnerSequence.FinishedEntries.Count; i++) {
XsdKeyEntry other = (XsdKeyEntry) entry.OwnerSequence.FinishedEntries [i];
if (this.entry.CompareIdentity (other))
return false;
}
}
return true;
}
示例6: NvdlReader
private NvdlReader (XmlReader reader)
{
// FIXME: use .rnc validation.
this.reader = reader;
this.lineInfo = reader as IXmlLineInfo;
reader.MoveToContent ();
}
示例7: ParseColor
static Color? ParseColor(IXmlLineInfo lineInfo, string color)
{
if (string.IsNullOrEmpty(color))
return null;
return ColorConverter.ConvertFromString(color);
}
示例8: Error
static Exception Error(IXmlLineInfo lineInfo, string message)
{
if (lineInfo != null)
return new HighlightingDefinitionInvalidException(HighlightingLoader.FormatExceptionMessage(message, lineInfo.LineNumber, lineInfo.LinePosition));
else
return new HighlightingDefinitionInvalidException(message);
}
示例9: NvdlFilteredXmlReader
public NvdlFilteredXmlReader (XmlReader reader,
NvdlValidateInterp validate)
{
this.reader = reader;
reader_as_line_info = reader as IXmlLineInfo;
this.validate = validate;
}
示例10: SetLineInfo
private void SetLineInfo(IXmlLineInfo lineInfo, SearchResult searchResult)
{
if(lineInfo.HasLineInfo())
{
searchResult.LineNumber = lineInfo.LineNumber;
searchResult.LinePosition = lineInfo.LinePosition;
}
}
示例11: WrapMessage
private static string WrapMessage(IXmlLineInfo lineInfo, string message, Exception innerException)
{
if (innerException == null)
return string.Format("{0} (line: {1}, col: {2})", message, lineInfo.LineNumber, lineInfo.LinePosition);
return string.Format("{0} (line: {1}, col: {2}): [{3}] {4}", message, lineInfo.LineNumber,
lineInfo.LinePosition, innerException.GetType().Name, innerException.Message);
}
示例12: Attribute
public Attribute(string name, IXmlLineInfo lineInfo)
{
this.name = name;
_hasLineInfo = lineInfo.HasLineInfo();
_lineNumber = lineInfo.LineNumber;
_linePosition = lineInfo.LinePosition;
}
示例13: XsdCachingReader
//Constructor
internal XsdCachingReader(XmlReader reader, IXmlLineInfo lineInfo, CachingEventHandler handlerMethod) {
this.coreReader = reader;
this.lineInfo = lineInfo;
this.cacheHandler = handlerMethod;
attributeEvents = new ValidatingReaderNodeData[InitialAttributeCount];
contentEvents = new ValidatingReaderNodeData[InitialContentCount];
Init();
}
示例14: XsdCachingReader
internal XsdCachingReader(XmlReader reader, IXmlLineInfo lineInfo, CachingEventHandler handlerMethod)
{
this.coreReader = reader;
this.lineInfo = lineInfo;
this.cacheHandler = handlerMethod;
this.attributeEvents = new ValidatingReaderNodeData[8];
this.contentEvents = new ValidatingReaderNodeData[4];
this.Init();
}
示例15: Load
/// <summary>
/// Loads the XML document from the specified <see cref="XmlReader"/>.
/// </summary>
public override void Load(XmlReader reader)
{
lineInfo = reader as IXmlLineInfo;
try {
base.Load(reader);
} finally {
lineInfo = null;
}
}