Ejemplo n.º 1
0
        /// <summary>
        /// Конструктор.
        /// </summary>
        /// <param name="config">Конфигурация.</param>
        /// <param name="externals">Внешнее.</param>
        public ModAutomationBaseContext(ModAutomationBaseConfig config, ModAutomationBaseExternals externals)
        {
            Config = config;

            var resourceErrors    = new ModAutomationBaseResourceErrors(externals.ResourceErrorsLocalizer);
            var resourceSuccesses = new ModAutomationBaseResourceSuccesses(externals.ResourceSuccessesLocalizer);

            PartAngular = new ModAutomationBasePartAngularContext(
                Config.Settings.PartAngular,
                new ModAutomationBasePartAngularExternals
            {
                CoreBaseResourceErrors = externals.CoreBaseResourceErrors,
                ResourceErrors         = resourceErrors,
                ResourceSuccesses      = resourceSuccesses
            });

            PartNetCore = new ModAutomationBasePartNetCoreContext(
                Config.Settings.PartNetCore,
                new ModAutomationBasePartNetCoreExternals
            {
                CoreBaseResourceErrors = externals.CoreBaseResourceErrors,
                ResourceErrors         = resourceErrors,
                ResourceSuccesses      = resourceSuccesses
            });

            Resources = new ModAutomationBaseResources(
                externals.ResourceErrorsLocalizer,
                externals.ResourceSuccessesLocalizer
                );
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Инициализировать конфигурацию.
 /// </summary>
 /// <param name="environment">Окружение.</param>
 public void InitConfig(CoreBaseEnvironment environment)
 {
     Config = new ModAutomationBaseConfig(environment);
 }