public void QueueCallbackTask(EventWatcherOptions watcherOptions, TraceEvent etwEvent) { _callbackTaskQueue.Enqueue(new CallbackTask() { WatcherOptions = watcherOptions, EtwEvent = etwEvent }); _callbackTaskQueuedEvent.Set(); }
public void AddWatcher(EventWatcherOptions watcherOptions) { if (string.IsNullOrWhiteSpace(watcherOptions.SessionName)) { throw new PSArgumentException("SessionName cannot be empty."); } if (_watchers.ContainsKey(watcherOptions.SessionName)) { throw new PSArgumentException(string.Format("Session {0} already exists! Please choose another session name.", watcherOptions.SessionName)); } _watchers.Add(watcherOptions.SessionName, new EventWatcher(this, watcherOptions)); }
public EventWatcher(EventWatcherManager watcherManager, EventWatcherOptions watcherOptions) { _watcherManager = watcherManager; _watcherOptions = watcherOptions; }