protected internal virtual void OnWorkspaceFailed(WorkspaceDiagnostic diagnostic)
 {
     var ev = _eventMap.GetEventHandlers<EventHandler<WorkspaceDiagnosticEventArgs>>(WorkspaceFailedEventName);
     if (ev.HasHandlers)
     {
         var args = new WorkspaceDiagnosticEventArgs(diagnostic);
         ev.RaiseEvent(handler => handler(this, args));
     }
 }
Exemplo n.º 2
0
        protected internal virtual void OnWorkspaceFailed(WorkspaceDiagnostic diagnostic)
        {
            var ev = _eventMap.GetEventHandlers <EventHandler <WorkspaceDiagnosticEventArgs> >(WorkspaceFailedEventName);

            if (ev.HasHandlers)
            {
                var args = new WorkspaceDiagnosticEventArgs(diagnostic);
                ev.RaiseEvent(handler => handler(this, args));
            }
        }
Exemplo n.º 3
0
 protected internal virtual void OnWorkspaceFailed(WorkspaceDiagnostic diagnostic)
 {
     var handlers = this.eventMap.GetEventHandlers<EventHandler<WorkspaceDiagnosticEventArgs>>(WorkspaceFailedEventName);
     if (handlers.Length > 0)
     {
         var args = new WorkspaceDiagnosticEventArgs(diagnostic);
         foreach (var handler in handlers)
         {
             handler(this, args);
         }
     }
 }
Exemplo n.º 4
0
        protected internal virtual void OnWorkspaceFailed(WorkspaceDiagnostic diagnostic)
        {
            var handlers = this.eventMap.GetEventHandlers <EventHandler <WorkspaceDiagnosticEventArgs> >(WorkspaceFailedEventName);

            if (handlers.Length > 0)
            {
                var args = new WorkspaceDiagnosticEventArgs(diagnostic);
                foreach (var handler in handlers)
                {
                    handler(this, args);
                }
            }
        }
Exemplo n.º 5
0
 private Task RaiseWorkspaceFailedEventAsync(WorkspaceDiagnostic diagnostic)
 {
     var handlers = this.eventMap.GetEventHandlers<EventHandler<WorkspaceDiagnosticEventArgs>>(WorkspaceFailedEventName);
     if (handlers != null)
     {
         return this.ScheduleTask(() =>
         {
             var args = new WorkspaceDiagnosticEventArgs(diagnostic);
             foreach (var handler in handlers)
             {
                 handler(this, args);
             }
         }, "Workspace.WorkspaceFailed");
     }
     else
     {
         return SpecializedTasks.EmptyTask;
     }
 }
Exemplo n.º 6
0
        private Task RaiseWorkspaceFailedEventAsync(WorkspaceDiagnostic diagnostic)
        {
            var handlers = this.eventMap.GetEventHandlers <EventHandler <WorkspaceDiagnosticEventArgs> >(WorkspaceFailedEventName);

            if (handlers.Length > 0)
            {
                return(this.ScheduleTask(() =>
                {
                    var args = new WorkspaceDiagnosticEventArgs(diagnostic);
                    foreach (var handler in handlers)
                    {
                        handler(this, args);
                    }
                }, "Workspace.WorkspaceFailed"));
            }
            else
            {
                return(SpecializedTasks.EmptyTask);
            }
        }
 public WorkspaceDiagnosticEventArgs(WorkspaceDiagnostic diagnostic)
 {
     this.Diagnostic = diagnostic;
 }
 public WorkspaceDiagnosticEventArgs(WorkspaceDiagnostic diagnostic)
 {
     this.Diagnostic = diagnostic;
 }
Exemplo n.º 9
0
 protected internal virtual void OnWorkspaceFailed(WorkspaceDiagnostic diagnostic)
 {
     this.RaiseWorkspaceFailedEventAsync(diagnostic);
 }
Exemplo n.º 10
0
 protected internal virtual void OnWorkspaceFailed(WorkspaceDiagnostic diagnostic)
 {
     this.RaiseWorkspaceFailedEventAsync(diagnostic);
 }
Exemplo n.º 11
0
 protected internal override void OnWorkspaceFailed(WorkspaceDiagnostic diagnostic)
 {
     ImmutableInterlocked.Update(ref _diagnostics, d => d.Add(diagnostic));
     base.OnWorkspaceFailed(diagnostic);
 }