OperationContext CreateOperationContext (Message incoming)
{
ServiceRuntimeChannel contextChannel;
if (dispatch_runtime.CallbackClientRuntime.CallbackClientType != null) {
var type = ServiceProxyGenerator.CreateCallbackProxyType (dispatch_runtime, dispatch_runtime.CallbackClientRuntime.CallbackClientType);
contextChannel = (ServiceRuntimeChannel) Activator.CreateInstance (type, new object [] {reply_or_input, dispatch_runtime});
}
else
contextChannel = new ServiceRuntimeChannel (reply_or_input, dispatch_runtime);
OperationContext opCtx = new OperationContext (contextChannel);
opCtx.IncomingMessage = incoming;
opCtx.EndpointDispatcher = dispatch_runtime.EndpointDispatcher;
return opCtx;
}
}