示例#1
0
        /// <summary>
        /// Implements the TryRecieveRequest method of the IReplyChannel interface. It bridges the
        /// call to the inner channel located in the channel base.
        /// </summary>
        /// <param name="timeout">The System.TimeSpan that specifies how long the receive of a request operation
        /// has to complete before timing out and returning false</param>
        /// <param name="context">The System.ServiceModel.Channels.RequestContext received</param>
        /// <returns>true if a request message is received before the specified interval of time
        /// elapses; otherwise false</returns>
        public bool TryReceiveRequest(TimeSpan timeout, out RequestContext context)
        {
            WCFLogger.Write(TraceEventType.Verbose, "InterceptorReplyChannel tries to receive request");
            bool succes = InnerChannel.TryReceiveRequest(timeout, out context);

            return(succes);
        }
        public bool TryReceiveRequest(TimeSpan timeout, out RequestContext context)
        {
            RequestContext innerContext;

            if (InnerChannel.TryReceiveRequest(timeout, out innerContext))
            {
                context = WrapRequestContext(innerContext);
                return(true);
            }

            context = null;
            return(false);
        }
示例#3
0
        public bool TryReceiveRequest(TimeSpan timeout, out RequestContext requestContext)
        {
            TimeoutHelper timeoutHelper = new TimeoutHelper(timeout);

            RequestContext innerContext;

            if (InnerChannel.TryReceiveRequest(timeoutHelper.RemainingTime(), out innerContext))
            {
                requestContext = FinishReceiveRequest(innerContext, timeoutHelper.RemainingTime());
                return(true);
            }
            else
            {
                requestContext = null;
                return(false);
            }
        }
示例#4
0
 public bool TryReceiveRequest(System.TimeSpan timeout, out RequestContext context)
 {
     Console.WriteLine("MyReplyChannel.TryReceiveRequest()");
     return(InnerChannel.TryReceiveRequest(timeout, out context));
 }