public void Run() { _session = new TraceEventSession(_watcherOptions.SessionName); _session.Source.Dynamic.All += delegate(TraceEvent etwEvent) { _watcherManager.QueueCallbackTask(_watcherOptions, etwEvent); }; _session.EnableEventSources(_watcherOptions.EventSources); WatcherTask = Task.Run(() => { _session.Source.Process(); }); }