internal void OnProgressChanged(NodeProgressEventArgs args) { EventHandler <NodeProgressEventArgs> eventHandler; lock (_mutex) { eventHandler = __onProgressChangeEvent; __eventArgs = args; } eventHandler?.Invoke(this, args); }
internal void OnProgressEnded(NodeProgressEndEventArgs args) { EventHandler <NodeProgressEndEventArgs> eventHandler; lock (_mutex) { eventHandler = __onProgressEndEvent; __eventArgs = args; CancelableProgressing cp; Log?.LogInformation($"Detected progress end for '{args.TaskName}' with logging filter '{args.Reason}'"); if ((null != args.InternalState) && progressMonitor.TryRemove(args.InternalState, out cp)) { Log?.LogInformation($"Progress monitor ended with {cp.State.State} at {cp.State.Percentage}%"); cp.Dispose(); } } eventHandler?.Invoke(this, args); }