コード例 #1
0
        public void SetUp()
        {
            requestCallbacker  = new RequestCallbacker();
            requestAccumulator = new RequestAccumulator(requestCallbacker);
            var requestDelegate     = new RequestDelegate(requestAccumulator);
            var transactionDelegate = new HttpServerTransactionDelegate(requestDelegate);

            responseAccumulator = new ResponseAccumulator();
            transactionInput    = new TransactionInput(responseAccumulator, transactionDelegate);

            postedActions = new Queue <Action>();
        }
コード例 #2
0
        IEnumerable <Action> GetInputActions(IEnumerable <RequestInfo> requests, TransactionInput txInput)
        {
            foreach (var request in requests)
            {
                yield return(() => transactionInput.OnRequest(request));

                if (request.Data != null)
                {
                    foreach (var chunk in request.Data)
                    {
                        yield return(() => transactionInput.OnRequestData(chunk));
                    }
                }

                yield return(() => transactionInput.OnRequestEnd());
            }

            yield return(() => transactionInput.OnEnd());

            yield return(() => transactionInput.OnClose());
        }
コード例 #3
0
        IEnumerable<Action> GetInputActions(IEnumerable<RequestInfo> requests, TransactionInput txInput)
        {
            foreach (var request in requests)
            {
                yield return () => transactionInput.OnRequest(request);

                if (request.Data != null)
                    foreach (var chunk in request.Data)
                        yield return () => transactionInput.OnRequestData(chunk);

                yield return () => transactionInput.OnRequestEnd();

            }

            yield return () => transactionInput.OnEnd();
            yield return () => transactionInput.OnClose();
        }
コード例 #4
0
        public void SetUp()
        {
            requestCallbacker = new RequestCallbacker();
            requestAccumulator = new RequestAccumulator(requestCallbacker);
            var requestDelegate = new RequestDelegate(requestAccumulator);
            var transactionDelegate = new HttpServerTransactionDelegate(requestDelegate);
            responseAccumulator = new ResponseAccumulator();
            transactionInput = new TransactionInput(responseAccumulator, transactionDelegate);

            postedActions = new Queue<Action>();
        }