Example #1
0
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="config">Конфигурация.</param>
        /// <param name="externals">Внешнее.</param>
        public ModDummyMainBaseContext(ModDummyMainBaseConfig config, ModDummyMainBaseExternals externals)
        {
            Config = config;

            Resources = new ModDummyMainBaseResources(
                externals.ResourceErrorsLocalizer,
                externals.ResourceSuccessesLocalizer
                );

            Service = new ModDummyMainBaseService(
                Config.Settings,
                externals.CoreBaseDataProvider,
                externals.DataEntityDbFactory
                );

            Jobs = new ModDummyMainBaseJobs(
                externals.CoreBaseResourceErrors,
                externals.DataBaseSettings,
                Resources.Successes,
                Resources.Errors,
                Service
                );
        }
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="coreBaseResourceErrors">Ядро. Основа. Ресурсы. Ошибки.</param>
        /// <param name="cache">Кэш.</param>
        /// <param name="cacheSettings">Настройки кэша.</param>
        /// <param name="coreCachingResourceErrors">Ядро. Кэширование. Ресурсы. Ошибки.</param>
        /// <param name="dataBaseSettings">Данные. Основа. Настройки.</param>
        /// <param name="resourceSuccesses">Ресурсы. Успехи.</param>
        /// <param name="resourceErrors">Ресурсы. Ошибки.</param>
        /// <param name="service">Сервис.</param>
        public ModDummyMainCachingJobs(
            CoreBaseResourceErrors coreBaseResourceErrors,
            ICoreCachingCache cache,
            ICoreCachingCommonClientConfigSettings cacheSettings,
            CoreCachingResourceErrors coreCachingResourceErrors,
            DataBaseSettings dataBaseSettings,
            ModDummyMainBaseResourceSuccesses resourceSuccesses,
            ModDummyMainBaseResourceErrors resourceErrors,
            ModDummyMainBaseService service
            )
        {
            JobItemDelete = new ModDummyMainCachingJobItemDeleteService(
                service.DeleteItem,
                coreBaseResourceErrors,
                resourceSuccesses,
                dataBaseSettings,
                cacheSettings,
                cache,
                coreCachingResourceErrors
                );

            JobItemGet = new ModDummyMainCachingJobItemGetService(
                service.GetItem,
                coreBaseResourceErrors,
                dataBaseSettings,
                cacheSettings,
                cache,
                coreCachingResourceErrors
                );

            JobItemInsert = new ModDummyMainCachingJobItemInsertService(
                service.SaveItem,
                coreBaseResourceErrors,
                resourceSuccesses,
                resourceErrors,
                dataBaseSettings,
                cacheSettings,
                cache,
                coreCachingResourceErrors
                );

            JobItemUpdate = new ModDummyMainCachingJobItemUpdateService(
                service.SaveItem,
                coreBaseResourceErrors,
                resourceSuccesses,
                resourceErrors,
                dataBaseSettings,
                cacheSettings,
                cache,
                coreCachingResourceErrors
                );

            JobListGet = new ModDummyMainCachingJobListGetService(
                service.GetList,
                coreBaseResourceErrors,
                dataBaseSettings,
                cacheSettings,
                cache,
                coreCachingResourceErrors
                );

            JobOptionsDummyManyToManyGet = new ModDummyMainCachingJobOptionsDummyManyToManyGetService(
                service.GetOptionsDummyManyToMany,
                coreBaseResourceErrors,
                dataBaseSettings,
                cacheSettings,
                cache,
                coreCachingResourceErrors
                );

            JobOptionsDummyOneToManyGet = new ModDummyMainCachingJobOptionsDummyOneToManyGetService(
                service.GetOptionsDummyOneToMany,
                coreBaseResourceErrors,
                dataBaseSettings,
                cacheSettings,
                cache,
                coreCachingResourceErrors
                );
        }