public StateManager(ValidationVisitor visitor, object newModel) { _visitor = visitor; _newModel = newModel; _container = _visitor.Container; _key = _visitor.Key; _metadata = _visitor.Metadata; _model = _visitor.Model; _strategy = _visitor.Strategy; }
public static StateManager Recurse( ValidationVisitor visitor, string key, ModelMetadata metadata, object model, IValidationStrategy strategy) { var recursifier = new StateManager(visitor, model); visitor.Container = visitor.Model; visitor.Key = key; visitor.Metadata = metadata; visitor.Model = model; visitor.Strategy = strategy; return(recursifier); }