public VisitorFactory( ClassProcessorFactory classProcessorFactory, FieldProcessorFactory fieldProcessorFactory) { this.classProcessorFactory = classProcessorFactory; this.fieldProcessorFactory = fieldProcessorFactory; }
public VisitorFactory <TData> Class <T>(ClassProcessorFactory <T> factory) { var old = this.classProcessorFactory; this.classProcessorFactory = type => { return(type.IsAssignableFrom(typeof(T)) ? factory() : old(type)); }; return(this); }