Esempio n. 1
0
 public void QueueCallbackTask(EventWatcherOptions watcherOptions, TraceEvent etwEvent)
 {
     _callbackTaskQueue.Enqueue(new CallbackTask()
     {
         WatcherOptions = watcherOptions, EtwEvent = etwEvent
     });
     _callbackTaskQueuedEvent.Set();
 }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 public EventWatcher(EventWatcherManager watcherManager, EventWatcherOptions watcherOptions)
 {
     _watcherManager = watcherManager;
     _watcherOptions = watcherOptions;
 }