Inheritance: System.EventArgs
Ejemplo n.º 1
0
        /// <summary>
        /// Ensures parser state accounts for built-in declarations.
        /// </summary>
        /// <summary>
        /// Requests reparse for specified component.
        /// Omit parameter to request a full reparse.
        /// </summary>
        /// <param name="requestor">The object requesting a reparse.</param>
        /// <param name="component">The component to reparse.</param>
        public void OnParseRequested(object requestor, VBComponent component = null)
        {
            var handler = ParseRequest;

            if (handler != null)
            {
                var args = new ParseRequestEventArgs(component);
                handler.Invoke(requestor, args);
            }
        }
Ejemplo n.º 2
0
 private void ReparseRequested(object sender, ParseRequestEventArgs e)
 {
     if (e.IsFullReparseRequest)
     {
         Cancel();
         ParseAll();
     }
     else
     {
         Cancel(e.Component);
         ParseAsync(e.Component, CancellationToken.None);
     }
 }
Ejemplo n.º 3
0
 private void ReparseRequested(object sender, ParseRequestEventArgs e)
 {
     if (e.IsFullReparseRequest)
     {
         Cancel();
         ParseAll();
     }
     else
     {
         Cancel(e.Component);
         ParseAsync(e.Component, CancellationToken.None);
     }
 }
Ejemplo n.º 4
0
        private void ReparseRequested(object sender, ParseRequestEventArgs e)
        {
            if (e.IsFullReparseRequest)
            {
                Cancel();
                Task.Run(() => ParseAll());
            }
            else
            {
                Cancel(e.Component);
                Task.Run(() =>
                {
                    ParseAsync(e.Component, CancellationToken.None).Wait();

                    if (_state.Status != ParserState.Error)
                    {
                        Logger.Trace("Starting resolver task");
                        Resolve(_central.Token);
                    }
                });
            }
        }
 /// <summary>
 /// Ensures parser state accounts for built-in declarations.
 /// </summary>
 /// <summary>
 /// Requests reparse for specified component.
 /// Omit parameter to request a full reparse.
 /// </summary>
 /// <param name="requestor">The object requesting a reparse.</param>
 /// <param name="component">The component to reparse.</param>
 public void OnParseRequested(object requestor, VBComponent component = null)
 {
     var handler = ParseRequest;
     if (handler != null)
     {
         var args = new ParseRequestEventArgs(component);
         handler.Invoke(requestor, args);
     }
 }