I would like to provide an operation contract in my WCF library that returns select information, i.e. version, assembly name, some other internal values.
The purpose is to provide a "Service Check" method for diagnostics and such that can be called as a regular WCF.
I am having trouble figuring out the best way to do this. I imagine some sort of internal reflection.
I would also like to put this code inside the Interface as part of the operation contract.
What is the best way to do this?
You can do this using reflection:
For example, to get the assembly's version info:
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With