private CategoriesAdminManager DefaultCategoryAdminManager() { var dbFactory = DefaultInit.GetTestDataBaseFactory(); var catCache = new CategoriesCache(dbFactory); return(new CategoriesAdminManager(dbConnection, catCache, new Sanitizer())); }
private CategoriesAdminManager DefaultCategoryAdminManager() { var dbFactory = DefaultInit.GetTestDataBaseFactory(); var catCache = new CategoriesCache(dbFactory); /*return new CategoriesAdminManager(dbConnection, * Options.Create(new MaterialsOptions {SubTitleLength = 100, PreviewLength = 800}), catCache, * new Sanitizer(new SanitizerOptions()));*/ throw new NotSupportedException("Need moq SanitizerService"); }
private CategoriesAdminManager DefaultCategoryAdminManager() { var dbFactory = DefaultInit.GetTestDataBaseFactory(); var catCache = new CategoriesCache(dbFactory); return(new CategoriesAdminManager(dbConnection, Options.Create(new MaterialsOptions { SubTitleLength = 100, PreviewLength = 800 }), catCache, new Sanitizer())); }
private CacheSettingsManager InitializeDefaultSettingsManager() { var serviceCollection = new ServiceCollection(); serviceCollection.AddOptions <IOptions <CacheOptions> >(); serviceCollection.AddMemoryCache(); var serviceProvider = serviceCollection.BuildServiceProvider(); var categoriesCache = new CategoriesCache(DefaultInit.GetTestDataBaseFactory()); var cacheOptions = serviceProvider.GetRequiredService <IOptions <CacheOptions> >(); var contentCache = new CategoryContentCache(categoriesCache, serviceProvider.GetRequiredService <IMemoryCache>(), serviceProvider.GetRequiredService <IOptions <CacheOptions> >()); return(new CacheSettingsManager(cacheOptions, contentCache, dbConnection)); }
public ItemController(IItemRepository itemRepository, CategoriesCache cache) { this.itemRepository = itemRepository; this.cache = cache; }
public CategoryController(ICategoryRepository categoryRepository, CategoriesCache cache) { this.categoryRepository = categoryRepository; this.cache = cache; }
public CategoryItemsStockChangedHandler(IItemRepository itemrepository, CategoriesCache cache) { this.itemrepository = itemrepository; this.cache = cache; }