示例#1
0
        /// <inheritdoc />
        public override IAsyncResult BeginProcessRequest(IAMFContext context, IMessage request, AsyncCallback callback, object asyncState)
        {
            MessageProcessor processor = new MessageProcessor(context, request, this, callback, asyncState);

            processor.BeginTask();
            return(processor);
        }
 /// <inheritdoc />
 public override IAsyncResult BeginProcessRequest(IAMFContext context, IMessage request, AsyncCallback callback,
     object asyncState)
 {
     CommandMessage commandMessage = (CommandMessage)request;
     MessageProcessor processor = new MessageProcessor(context, commandMessage, this, callback, asyncState);
     processor.BeginTask();
     return processor;
 }
        /// <inheritdoc />
        public IAsyncResult BeginProcessRequest(IAMFContext context, IMessage request, AsyncCallback callback,
            object asyncState)
        {
            if (context == null)
                throw new ArgumentNullException("context");
            if (request == null)
                throw new ArgumentNullException("request");

            IService service = UncheckedGetServiceForMessage(context.Serializer, request);

            MessageProcessor processor = new MessageProcessor(context, request, service, callback, asyncState);
            processor.BeginTask();
            return processor;
        }
示例#4
0
        /// <inheritdoc />
        public IAsyncResult BeginProcessRequest(IAMFContext context, IMessage request, AsyncCallback callback,
                                                object asyncState)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            IService service = UncheckedGetServiceForMessage(context.Serializer, request);

            MessageProcessor processor = new MessageProcessor(context, request, service, callback, asyncState);

            processor.BeginTask();
            return(processor);
        }