Is it possible to pass dynamic values for attributes to event in EventSource?

Topics: Semantic Logging Application Block
Jul 8, 2013 at 9:30 PM
Is there any way to pass a dynamic value for Version as an Event Attribute when writing an event? We have multiple client sites running different instances of the same app. We want to run SLAB out of process, so the different sites will be sharing the same SemanticLogging-svc.xml file and using the same SQL Database listener.

I am trying to figure out how to query a value at runtime (from the application's config file or elsewhere) and pass that to the Version attribute in the EventSource to be recorded in the SQL Traces table. This would allow us to query the Traces table by Version without having to use a slower varchar field as a filter.
Jul 10, 2013 at 4:48 AM
I think the answer is no. Attribute values are evaluated at compile time and have to be constants. Also, I believe that the version property will end up as being part of the EventSource manifest so having different values would probably cause an error.

Randy Levy
Enterprise Library support engineer
Support How-to