Пример #1
0
		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;
		}
Пример #2
0
		OperationContext CreateOperationContext (Message incoming)
		{
			IContextChannel contextChannel;
			if (dispatch_runtime.CallbackClientRuntime.CallbackClientType != null) {
#if DISABLE_REAL_PROXY
				var type = ServiceProxyGenerator.CreateCallbackProxyType (dispatch_runtime, dispatch_runtime.CallbackClientRuntime.CallbackClientType);
				contextChannel = (ServiceRuntimeChannel) Activator.CreateInstance (type, new object [] {reply_or_input, dispatch_runtime});
#else
				contextChannel = (IContextChannel) new ClientRealProxy (dispatch_runtime.CallbackClientRuntime.CallbackClientType, new DuplexServiceRuntimeChannel (reply_or_input, dispatch_runtime), true).GetTransparentProxy ();
#endif
			}
			else
				contextChannel = new ServiceRuntimeChannel (reply_or_input, dispatch_runtime);
			contextChannel.Open (); // FIXME: timeout?
			OperationContext opCtx = new OperationContext (contextChannel);
			opCtx.IncomingMessage = incoming;
			opCtx.EndpointDispatcher = dispatch_runtime.EndpointDispatcher;
			return opCtx;
		}
Пример #3
0
        OperationContext CreateOperationContext(Message incoming)
        {
            ServiceRuntimeChannel contextChannel;

            if (dispatch_runtime.HasCallbackRuntime)
            {
                var type = ServiceProxyGenerator.CreateCallbackProxyType(dispatch_runtime.Type, 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);
        }
Пример #4
0
        OperationContext CreateOperationContext(Message incoming)
        {
            IContextChannel contextChannel;

            if (dispatch_runtime.CallbackClientRuntime.CallbackClientType != null)
            {
#if DISABLE_REAL_PROXY
                var type = ServiceProxyGenerator.CreateCallbackProxyType(dispatch_runtime, dispatch_runtime.CallbackClientRuntime.CallbackClientType);
                contextChannel = (ServiceRuntimeChannel)Activator.CreateInstance(type, new object [] { reply_or_input, dispatch_runtime });
#else
                contextChannel = (IContextChannel) new ClientRealProxy(dispatch_runtime.CallbackClientRuntime.CallbackClientType, new DuplexServiceRuntimeChannel(reply_or_input, dispatch_runtime), true).GetTransparentProxy();
#endif
            }
            else
            {
                contextChannel = new ServiceRuntimeChannel(reply_or_input, dispatch_runtime);
            }
            contextChannel.Open();              // FIXME: timeout?
            OperationContext opCtx = new OperationContext(contextChannel);
            opCtx.IncomingMessage    = incoming;
            opCtx.EndpointDispatcher = dispatch_runtime.EndpointDispatcher;
            return(opCtx);
        }