Beispiel #1
0
 protected static XmlSyntaxDiagnosticInfo MakeError(
     XmlParseErrorCode code,
     params object[] args
     )
 {
     return(new XmlSyntaxDiagnosticInfo(0, 0, code, args));
 }
Beispiel #2
0
 protected void AddError(
     int position,
     int width,
     XmlParseErrorCode code,
     params object[] args
     )
 {
     this.AddError(this.MakeError(position, width, code, args));
 }
 internal XmlSyntaxDiagnosticInfo(
     int offset,
     int width,
     XmlParseErrorCode code,
     params object[] args
     ) : base(offset, width, ErrorCode.WRN_XMLParseError, args)
 {
     _xmlErrorCode = code;
 }
Beispiel #4
0
        protected XmlSyntaxDiagnosticInfo MakeError(
            int position,
            int width,
            XmlParseErrorCode code,
            params object[] args
            )
        {
            int offset = GetLexemeOffsetFromPosition(position);

            return(new XmlSyntaxDiagnosticInfo(offset, width, code, args));
        }
 private XmlSyntaxDiagnosticInfo(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     xmlErrorCode = (XmlParseErrorCode)info.GetInt32("xmlErrorCode");
 }
 internal XmlSyntaxDiagnosticInfo(XmlParseErrorCode code, params object[] args)
     : this(0, 0, code, args)
 {
 }
 protected XmlSyntaxDiagnosticInfo(ObjectReader reader)
     : base(reader)
 {
     this.xmlErrorCode = (XmlParseErrorCode)reader.ReadCompressedUInt();
 }
 internal XmlSyntaxDiagnosticInfo(int offset, int width, XmlParseErrorCode code, params object[] args)
     : base(offset, width, ErrorCode.WRN_XMLParseError, args)
 {
     _xmlErrorCode = code;
 }
 private XmlSyntaxDiagnosticInfo(ObjectReader reader)
     : base(reader)
 {
     _xmlErrorCode = (XmlParseErrorCode)reader.ReadUInt32();
 }
Beispiel #10
0
        protected XmlSyntaxDiagnosticInfo MakeError(int position, int width, XmlParseErrorCode code, params object[] args)
        {
            int offset = position >= TextWindow.LexemeStartPosition ? position - TextWindow.LexemeStartPosition : position;

            return(new XmlSyntaxDiagnosticInfo(offset, width, code, args));
        }
Beispiel #11
0
        private SyntaxToken WithXmlParseError(SyntaxToken node, XmlParseErrorCode code, params string[] args)
        {
            XmlParseErrorArgument arg = new XmlParseErrorArgument(code, args);

            return(node.WithAdditionalDiagnostics(this.MakeError(0, node.Width, ErrorCode.WRN_XMLParseError, arg)));
        }
Beispiel #12
0
 protected XmlSyntaxDiagnosticInfo MakeError(int position, int width, XmlParseErrorCode code, params object[] args)
 {
     int offset = GetLexemeOffsetFromPosition(position);
     return new XmlSyntaxDiagnosticInfo(offset, width, code, args);
 }
Beispiel #13
0
 /// <remarks>Don't call this during a parse--it loads resources</remarks>
 public static string GetMessage(XmlParseErrorCode id, CultureInfo culture)
 {
     return ResourceManager.GetString(id.ToString(), culture);
 }
Beispiel #14
0
 protected static XmlSyntaxDiagnosticInfo MakeError(XmlParseErrorCode code, params object[] args)
 {
     return new XmlSyntaxDiagnosticInfo(0, 0, code, args);
 }
Beispiel #15
0
 protected static XmlSyntaxDiagnosticInfo MakeError(XmlParseErrorCode code)
 {
     return(new XmlSyntaxDiagnosticInfo(0, 0, code));
 }
Beispiel #16
0
 protected XmlSyntaxDiagnosticInfo MakeError(int position, int width, XmlParseErrorCode code, params object[] args)
 {
     int offset = position >= TextWindow.LexemeStartPosition ? position - TextWindow.LexemeStartPosition : position;
     return new XmlSyntaxDiagnosticInfo(offset, width, code, args);
 }
Beispiel #17
0
 protected void AddError(XmlParseErrorCode code, params object[] args)
 {
     this.AddError(MakeError(code, args));
 }
Beispiel #18
0
 protected void AddError(int position, int width, XmlParseErrorCode code, params object[] args)
 {
     this.AddError(this.MakeError(position, width, code, args));
 }
Beispiel #19
0
 protected static XmlSyntaxDiagnosticInfo MakeError(XmlParseErrorCode code)
 {
     return new XmlSyntaxDiagnosticInfo(0, 0, code);
 }
Beispiel #20
0
 protected void AddError(XmlParseErrorCode code)
 {
     this.AddError(MakeError(code));
 }
 protected XmlSyntaxDiagnosticInfo(ObjectReader reader)
     : base(reader)
 {
     this.xmlErrorCode = (XmlParseErrorCode)reader.ReadCompressedUInt();
 }
 private XmlSyntaxDiagnosticInfo(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     xmlErrorCode = (XmlParseErrorCode)info.GetInt32("xmlErrorCode");
 }
Beispiel #23
0
 protected void AddError(XmlParseErrorCode code)
 {
     this.AddError(MakeError(code));
 }
Beispiel #24
0
 private XmlSyntaxDiagnosticInfo(ObjectReader reader)
     : base(reader)
 {
     _xmlErrorCode = (XmlParseErrorCode)reader.ReadUInt32();
 }
Beispiel #25
0
 protected void AddError(XmlParseErrorCode code, params object[] args)
 {
     this.AddError(MakeError(code, args));
 }
 internal XmlSyntaxDiagnosticInfo(XmlParseErrorCode code, params object[] args)
     : this(0, 0, code, args)
 {
 }
Beispiel #27
0
 public static string GetMessage(XmlParseErrorCode id, CultureInfo culture)
 {
     return(ResourceManager.GetString(id.ToString(), culture));
 }
Beispiel #28
0
        private TNode WithXmlParseError <TNode>(TNode node, XmlParseErrorCode code, params string[] args) where TNode : SyntaxNode
        {
            XmlParseErrorArgument arg = new XmlParseErrorArgument(code, args);

            return((TNode)node.WithAdditionalDiagnostics(this.MakeError(0, node.Width, ErrorCode.WRN_XMLParseError, arg)));
        }