コード例 #1
0
        private object[] BeforeInvoke()
        {
            var stateRef   = new BeforeInvokeArgs.StateRef();
            var pipeStates = new object[_pipes.Count];

            for (var pipeIndex = 0; pipeIndex < _pipes.Count; ++pipeIndex)
            {
                var beforeInvokeArgs = new BeforeInvokeArgs(this, stateRef);
                _pipes[pipeIndex].BeforeInvoke(beforeInvokeArgs);
                pipeStates[pipeIndex] = beforeInvokeArgs.State;
            }
            return(pipeStates);
        }
コード例 #2
0
ファイル: PipeInvocation.cs プロジェクト: redchew-fork/Zebus
        private object?[] BeforeInvoke()
        {
            if (_pipes.Count == 0)
            {
                return(Array.Empty <object?>());
            }

            var stateRef   = new BeforeInvokeArgs.StateRef();
            var pipeStates = new object?[_pipes.Count];

            for (var pipeIndex = 0; pipeIndex < _pipes.Count; ++pipeIndex)
            {
                var beforeInvokeArgs = new BeforeInvokeArgs(this, stateRef);
                _pipes[pipeIndex].BeforeInvoke(beforeInvokeArgs);
                pipeStates[pipeIndex] = beforeInvokeArgs.State;
            }

            return(pipeStates);
        }