public ListConfigurationFactoryTests() { var options = new GenericSearchOptions(); var optionsMock = new Mock <IOptions <GenericSearchOptions> >(); optionsMock.SetupGet(x => x.Value).Returns(options); var filterConfigurationFactory = new SearchConfigurationFactory(new PascalCasePropertyPathFinder()); var pageConfigurationFactory = new PageConfigurationFactory(optionsMock.Object); var rowsConfigurationFactory = new RowsConfigurationFactory(optionsMock.Object); var sortColumnConfigurationFactory = new SortColumnConfigurationFactory(optionsMock.Object); var sortDirectionConfigurationFactory = new SortDirectionConfigurationFactory(optionsMock.Object); var propertyConfigurationFactory = new PropertyConfigurationFactory(); var postRedirectGetConfigurationFactory = new PostRedirectGetConfigurationFactory(optionsMock.Object); var transferValuesConfigurationFactory = new TransferValuesConfigurationFactory(optionsMock.Object); var requestFactoryConfigurationFactory = new ModelActivatorConfigurationFactory(optionsMock.Object); factory = new ListConfigurationFactory(filterConfigurationFactory, pageConfigurationFactory, rowsConfigurationFactory, sortColumnConfigurationFactory, sortDirectionConfigurationFactory, propertyConfigurationFactory, postRedirectGetConfigurationFactory, transferValuesConfigurationFactory, requestFactoryConfigurationFactory); }
protected IOptions <GenericSearchOptions> CreateOptions(Action <GenericSearchOptions> action = null) { var options = new GenericSearchOptions(); action?.Invoke(options); return(new OptionsWrapper <GenericSearchOptions>(options)); }
public ModelActivatorConfigurationFactory(IOptions <GenericSearchOptions> options) { this.options = options.Value; defaultConfiguration = CreateDefaultConfiguration(); }
public RowsConfigurationFactory(IOptions <GenericSearchOptions> options) { this.options = options.Value; }
public PostRedirectGetConfigurationFactory(IOptions <GenericSearchOptions> options) { this.options = options.Value; }
public ListConfigurationProvider(IEnumerable <IListDefinitionSource> listDefinitions, IListConfigurationFactory listConfigurationFactory, IOptions <GenericSearchOptions> options) { this.options = options.Value; InitializeConfigurations(listDefinitions, listConfigurationFactory); }