Created
February 21, 2019 20:21
-
-
Save chrisnas/728578fb102e49c16b63c6f38e43b0d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void ListenToEtw(TraceEventSession etwSession) | |
{ | |
try | |
{ | |
// this call is blocking... until ewtSession.Stop is called (done in Dispose) | |
etwSession.Source.Process(); | |
} | |
finally | |
{ | |
etwSession.Dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment