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>();
        }
        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());
        }
        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();
        }
        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>();
        }