Ejemplo n.º 1
0
        void ISubmitInterceptorLink.InvokeNext(SubmitInterceptor current, SubmitArgs e)
        {
            //不需要检查 Index。
            //因为作为最后一个 Submitter(DataProvider),不能再调用 GetNext 方法。
            var next = _submitters[current.SubmitInterceptorIndex - 1];

            next.Submit(e, this);
        }
Ejemplo n.º 2
0
        internal void Add(SubmitInterceptor submitterInterceptor)
        {
            if (submitterInterceptor == null)
            {
                throw new ArgumentNullException("submitterInterceptor");
            }

            _submitters.Add(submitterInterceptor);
            submitterInterceptor.SubmitInterceptorIndex = _submitters.Count - 1;
        }