예제 #1
0
        protected void PerformInvocation(IInvocation invocation, Action <WcfInvocation> action)
        {
            var wcfInvocation = new WcfInvocation(channelHolder, invocation);

            ApplyChannelPipeline(0, wcfInvocation, action);
            invocation.ReturnValue = wcfInvocation.ReturnValue;
        }
예제 #2
0
		public override void Apply(WcfInvocation invocation)
		{
			if (Refresh)
			{
				invocation.Refresh(false);
			}

			invocation.Proceed();
		}
        public override void Apply(WcfInvocation invocation)
        {
            if (Refresh)
            {
                invocation.Refresh();
            }

            invocation.Proceed();
        }
예제 #4
0
		private static void InvokeRealProxy(RealProxy realProxy, WcfInvocation wcfInvocation)
		{
			var message = new MethodCallMessage(wcfInvocation.Method, wcfInvocation.Arguments);
			var returnMessage = (IMethodReturnMessage)realProxy.Invoke(message);
			if (returnMessage.Exception != null)
			{
				throw returnMessage.Exception;
			}
			wcfInvocation.ReturnValue = returnMessage.ReturnValue;
		}
		private static void InvokeRealProxy(RealProxy realProxy, WcfInvocation wcfInvocation)
		{
			var message = new MethodCallMessage(wcfInvocation.Method, wcfInvocation.Arguments);
			var returnMessage = (IMethodReturnMessage)realProxy.Invoke(message);
			if (returnMessage.Exception != null)
			{
				var exception = ExceptionHelper.PreserveStackTrace(returnMessage.Exception);
				throw exception;
			}
			wcfInvocation.ReturnValue = returnMessage.ReturnValue;
		}
		private void ApplyChannelPipeline(int policyIndex, WcfInvocation wcfInvocation, Action<WcfInvocation> action)
		{
			if (policyIndex >= pipeline.Length)
			{
				action(wcfInvocation);
				return;
			}
			var nextIndex = policyIndex + 1;
			wcfInvocation.SetProceedDelegate(() => ApplyChannelPipeline(nextIndex, wcfInvocation, action));
			pipeline[policyIndex].Apply(wcfInvocation);
		}
예제 #7
0
        private void ApplyChannelPipeline(int policyIndex, WcfInvocation wcfInvocation, Action <WcfInvocation> action)
        {
            if (policyIndex >= pipeline.Length)
            {
                action(wcfInvocation);
                return;
            }
            var nextIndex = policyIndex + 1;

            wcfInvocation.SetProceedDelegate(() => ApplyChannelPipeline(nextIndex, wcfInvocation, action));
            pipeline[policyIndex].Apply(wcfInvocation);
        }
예제 #8
0
        private static void InvokeRealProxy(RealProxy realProxy, WcfInvocation wcfInvocation)
        {
            var message       = new MethodCallMessage(wcfInvocation.Method, wcfInvocation.Arguments);
            var returnMessage = (IMethodReturnMessage)realProxy.Invoke(message);

            if (returnMessage.Exception != null)
            {
                var exception = ExceptionHelper.PreserveStackTrace(returnMessage.Exception);
                throw exception;
            }
            wcfInvocation.ReturnValue = returnMessage.ReturnValue;
        }
		protected void PerformInvocation(IInvocation invocation, Action<WcfInvocation> action)
		{
			var wcfInvocation = new WcfInvocation(channelHolder, invocation);
			ApplyChannelPipeline(0, wcfInvocation, action);
			invocation.ReturnValue = wcfInvocation.ReturnValue;
		}
		private static void InvokeChannel(IInvocation invocation, WcfInvocation wcfInvocation)
		{
			invocation.Proceed();
			wcfInvocation.ReturnValue = invocation.ReturnValue;
		}
예제 #11
0
 public override void Apply(WcfInvocation invocation)
 {
     invocation.Refresh(false).Proceed();
 }
		public override void Apply(WcfInvocation invocation)
		{
			invocation.Refresh().Proceed();
		}
예제 #13
0
 private static void InvokeChannel(IInvocation invocation, WcfInvocation wcfInvocation)
 {
     invocation.Proceed();
     wcfInvocation.ReturnValue = invocation.ReturnValue;
 }