/// <summary> /// Конструктор. /// </summary> /// <param name="executable">Выполняемое.</param> /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param> /// <param name="resourceSuccesses">Ресурсы успехов.</param> /// <param name="resourceErrors">Ресурсы ошибок.</param> /// <param name="dataBaseSettings">Настройки основы данных.</param> /// <param name="cacheSettings">Настройки кэширования.</param> /// <param name="cache">Кэш.</param> /// <param name="coreCachingResourceErrors">Ресурсы ошибок ядра кэширования.</param> public ModProductCachingJobItemInsertService( Func <ModProductBaseJobItemGetOutput, Task <ModProductBaseJobItemGetOutput> > executable, CoreBaseResourceErrors coreBaseResourceErrors, ModProductBaseResourceSuccesses resourceSuccesses, ModProductBaseResourceErrors resourceErrors, DataBaseSettings dataBaseSettings, ICoreCachingCommonClientConfigSettings cacheSettings, ICoreCachingCache cache, CoreCachingResourceErrors coreCachingResourceErrors ) : base(executable, coreBaseResourceErrors, resourceSuccesses, resourceErrors, dataBaseSettings) { if (cacheSettings.IsCachingEnabled) { var client = new CoreCachingClientWithChangeAndRead <ModProductBaseJobItemGetOutput>( "Item.Insert", cacheSettings, cache, coreCachingResourceErrors ); var tags = new[] { dataBaseSettings.Product.DbTableWithSchema, dataBaseSettings.ProductCategory.DbTableWithSchema, dataBaseSettings.ProductFeature.DbTableWithSchema, dataBaseSettings.ProductProductFeature.DbTableWithSchema }; Executable = input => client.ChangeAndRead(() => executable.Invoke(input), tags); } }
/// <summary> /// Конструктор. /// </summary> /// <param name="executable">Выполняемое.</param> /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param> /// <param name="resourceSuccesses">Ресурсы успехов.</param> /// <param name="resourceErrors">Ресурсы ошибок.</param> /// <param name="dataBaseSettings">Настройки основы данных.</param> /// <param name="cacheSettings">Настройки кэширования.</param> /// <param name="cache">Кэш.</param> /// <param name="coreCachingResourceErrors">Ресурсы ошибок ядра кэширования.</param> public ModDummyMainCachingJobItemUpdateService( Func <ModDummyMainBaseJobItemGetOutput, Task <ModDummyMainBaseJobItemGetOutput> > executable, CoreBaseResourceErrors coreBaseResourceErrors, ModDummyMainBaseResourceSuccesses resourceSuccesses, ModDummyMainBaseResourceErrors resourceErrors, DataBaseSettings dataBaseSettings, ICoreCachingCommonClientConfigSettings cacheSettings, ICoreCachingCache cache, CoreCachingResourceErrors coreCachingResourceErrors ) : base(executable, coreBaseResourceErrors, resourceSuccesses, resourceErrors, dataBaseSettings) { if (cacheSettings.IsCachingEnabled) { var client = new CoreCachingClientWithChangeAndRead <ModDummyMainBaseJobItemGetOutput>( "Item.Update", cacheSettings, cache, coreCachingResourceErrors ); var tags = new[] { dataBaseSettings.DummyMain.DbTableWithSchema, dataBaseSettings.DummyManyToMany.DbTableWithSchema, dataBaseSettings.DummyMainDummyManyToMany.DbTableWithSchema, dataBaseSettings.DummyOneToMany.DbTableWithSchema }; Executable = input => client.ChangeAndRead(() => executable.Invoke(input), tags); } }