Closed Mike-E-angelo closed 9 years ago
The ETW/EventSource framework requires that there is exactly one EventSource object for a given stream. So, you're forced to use a singleton.
I'm pretty sure that the rest of the code enforces the singleton behavior. For a non-EventSource implementation, I'd probably do it a different way.
Yeah... I see why now. That EventSource is just a wrapper around the kernel object, of which there is only one. Cool, thanks!
I'm looking at this line here: https://github.com/jonwagner/EventSourceProxy/blob/master/EventSourceProxy/TracingProxyImplementer.cs#L161
Just curious on why this and the next 2 likes (3 fields total) get created as static members. Shouldn't they be instance-members? If an implementer is using IoC with per-request (non-singleton) implementation, then the 2nd time this gets called, the _log field will be overwritten. I may have this completely misunderstood, however.