Skip to content

Instantly share code, notes, and snippets.

@chrisnas
Created February 21, 2019 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisnas/728578fb102e49c16b63c6f38e43b0d1 to your computer and use it in GitHub Desktop.
Save chrisnas/728578fb102e49c16b63c6f38e43b0d1 to your computer and use it in GitHub Desktop.
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