コード例 #1
0
 /// <summary>
 /// Fires an error occurred event.
 /// </summary>
 /// <param name="error">The associated error code.</param>
 /// <param name="position">Position of the error.</param>
 public void RaiseErrorOccurred(CssParseError error, TextPosition position)
 {
     if (_events != null)
     {
         var errorEvent = new CssParseErrorEvent(error.GetCode(), error.GetMessage(), position);
         _events.Publish(errorEvent);
     }
 }
コード例 #2
0
ファイル: CssTokenizer.cs プロジェクト: JBTech/AngleSharp
 /// <summary>
 /// Fires an error occurred event.
 /// </summary>
 /// <param name="error">The associated error code.</param>
 /// <param name="position">Position of the error.</param>
 public void RaiseErrorOccurred(CssParseError error, TextPosition position)
 {
     if (_events != null)
     {
         var errorEvent = new CssParseErrorEvent(error.GetCode(), error.GetMessage(), position);
         _events.Publish(errorEvent);
     }
 }
コード例 #3
0
        internal void RaiseErrorOccurred(CssParseError error, TextPosition position)
        {
            var handler = Error;

            if (handler != null)
            {
                var errorEvent = new CssErrorEvent(error, position);
                handler.Invoke(this, errorEvent);
            }
        }
コード例 #4
0
ファイル: CssTokenizer.cs プロジェクト: Wojdav/AngleSharp
        internal void RaiseErrorOccurred(CssParseError error, TextPosition position)
        {
            var handler = Error;

            if (handler != null)
            {
                var errorEvent = new CssErrorEvent(error, position);
                handler.Invoke(this, errorEvent);
            }
        }
コード例 #5
0
 public static Int32 GetCode(this CssParseError code)
 {
     return((Int32)code);
 }
コード例 #6
0
 void RaiseErrorOccurred(CssParseError code)
 {
     RaiseErrorOccurred(code, _base.GetCurrentPosition());
 }
コード例 #7
0
ファイル: CssBuilder.cs プロジェクト: mganss/AngleSharp
 void RaiseErrorOccurred(CssParseError code, CssToken token)
 {
     _tokenizer.RaiseErrorOccurred(code, token.Position);
 }
コード例 #8
0
 private void RaiseErrorOccurred(CssParseError code, TextPosition position)
 {
     _tokenizer.RaiseErrorOccurred(code, position);
 }
コード例 #9
0
ファイル: CssBuilder.cs プロジェクト: JackieyLi/AngleSharp
 /// <summary>
 /// Fires an error occurred event.
 /// </summary>
 /// <param name="code">The associated error code.</param>
 /// <param name="token">The associated token.</param>
 void RaiseErrorOccurred(CssParseError code, CssToken token)
 {
     _tokenizer.RaiseErrorOccurred(code, token.Position);
 }
コード例 #10
0
ファイル: CssBuilder.cs プロジェクト: Wojdav/AngleSharp
 private void RaiseErrorOccurred(CssParseError code, TextPosition position)
 {
     _tokenizer.RaiseErrorOccurred(code, position);
 }
コード例 #11
0
 /// <summary>
 /// Creates a new CssParseErrorEvent event.
 /// </summary>
 /// <param name="code">The provided error code.</param>
 /// <param name="position">The position in the source.</param>
 ///
 public CssErrorEvent(CssParseError code, TextPosition position)
     : base(EventNames.Error)
 {
     _code     = code;
     _position = position;
 }
コード例 #12
0
ファイル: CssTokenizer.cs プロジェクト: JBTech/AngleSharp
 /// <summary>
 /// Fires an error occurred event at the current position.
 /// </summary>
 /// <param name="code">The associated error code.</param>
 public void RaiseErrorOccurred(CssParseError code)
 {
     RaiseErrorOccurred(code, GetCurrentPosition());
 }
コード例 #13
0
 /// <summary>
 /// Fires an error occurred event at the current position.
 /// </summary>
 /// <param name="code">The associated error code.</param>
 public void RaiseErrorOccurred(CssParseError code)
 {
     RaiseErrorOccurred(code, GetCurrentPosition());
 }
コード例 #14
0
ファイル: CssErrorEvent.cs プロジェクト: Wojdav/AngleSharp
 /// <summary>
 /// Creates a new CssParseErrorEvent event.
 /// </summary>
 /// <param name="code">The provided error code.</param>
 /// <param name="position">The position in the source.</param>
 /// 
 public CssErrorEvent(CssParseError code, TextPosition position)
     : base(EventNames.ParseError)
 {
     _code = code;
     _position = position;
 }
コード例 #15
0
 internal void RaiseErrorOccurred(CssParseError error, TextPosition position)
 {
     Error?.Invoke(this, new CssErrorEvent(error, position));
 }
コード例 #16
0
 /// <summary>
 /// Creates a new CssParseErrorEvent event.
 /// </summary>
 /// <param name="code">The provided error code.</param>
 /// <param name="position">The position in the source.</param>
 ///
 public CssErrorEvent(CssParseError code, TextPosition position)
 {
     _code     = code;
     _position = position;
 }