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); }
public override IDecorationOf <IForwardMovingTokenizer <T> > ApplyThisDecorationTo(IForwardMovingTokenizer <T> thing) { var rv = new CompositeTokenizerDecoration <T>(thing, this.Router); return(rv); }