I want to setup ambient context (similar to how Thread.CurrentPrincipal works) for every operation of all services running inside the host.
What extension mechanism should I use? There are plenty of them so I'm confused since I have almost no experience of working with WCF.
Here is the solution:
First, we create the endpoint behavior which adds initializers to operations:
Then we create our own implementation of ICallContextInitializer:
Finally apply behavior by calling (sure, it's better to use IoC):