Will WCF use the same ParameterInspector instance to handle BeforeCall and AfterCall? -
If I create a square that implements the IParameterInspector, and put it in the WCF pipeline using a custom service beaver If so, then will it be the same when using the cloud when calling and after-call? In other words, can I establish a state about the current orientation during the first call that I can enter later and ensure that the response will come for the same example?
Note _stateValue in the sample code below? Can I depend on a mechanism like this?
Class Operation Parameter Inspector: IPAMTactor Inspector {Public Interest Value; Call before public object (string operation name, object [] input) {_stateValue = (int) input [0]; Return tap; } Postponed after public zero (string operation name, object [] output, object return value, object correlation state) {int originalInput = _stateValue; Return; }}
The purpose of return value is to pass a state related to a particular call < Call> Code> Before and After and correlationState the argument AfterCall . WCF infrastructure ensures that the thing coming back from call before has been returned to you in AfterCall in , After the operation is completed. As your subsequent comment shows, the problem of using the example position in the inspector object is that instances can be shared between concurrent requests in some scenarios. However, I do not think there are any scenarios in it where an operation request will be first done by various parameter inspector objects in call and offlock.
Comments
Post a Comment