示例#1
0
        public static CompositeTokenizerDecoration <T> MakeCompositeOf <T>(this IForwardMovingTokenizer <T> decorated, params IForwardMovingTokenizer <T>[] composites)
        {
            Condition.Requires(decorated).IsNotNull();

            var rv = new CompositeTokenizerDecoration <T>(decorated);

            composites.WithEach(x =>
            {
                var tokenizer = x.As <IHasStringIdTokenizer <T> >(false);
                if (tokenizer != null)
                {
                    rv.Router.AddTokenizer(tokenizer);
                }
            });
            return(rv);
        }
示例#2
0
        public override IDecorationOf <IForwardMovingTokenizer <T> > ApplyThisDecorationTo(IForwardMovingTokenizer <T> thing)
        {
            var rv = new CompositeTokenizerDecoration <T>(thing, this.Router);

            return(rv);
        }