public FormModePolicy(IChainFilter filter, FormMode mode) { _filter = filter; _mode = mode; }
public void ForInputTypesMatching(Func <Type, bool> filter, FormMode mode) { var chainFilter = new LambdaChainFilter(chain => chain.InputType() != null && filter(chain.InputType())); ForChainsMatching(chainFilter, mode); }
public void ForInputType <T>(FormMode mode) { ForChainsMatching(new InputTypeIs <T>(), mode); }
public void ForChainsMatching(IChainFilter filter, FormMode mode) { addPolicy(new FormModePolicy(filter, mode)); }
public void ForChainsMatching <T>(FormMode mode) where T : IChainFilter, new() { ForChainsMatching(new T(), mode); }