Say, I’m on a client side where the chain looks something like (simplified):
- Proxy method call
- Parameter inspection (
IParameterInspector) - Serialization/message formatting
- Message inspection (
IClientMessageInspector) - Channel
Are there any means to pass my context through the chain?
The problem i’m trying to solve is that IParameterInspector.AfterCall() is not get called in case of faults and I cannot obtain correlation state object i created in IParameterInspector.BeforeCall(), can I? But if I could store it in some context i would retrieve it in, for example, IClientMessageInspector.AfterReceiveReply() and be happy.
OperationContextis not available withinIClientMessageInspector. Ended up withThreadStaticfield in hope I won’t get multi-thread issues.