public static IConfigurationBuilder AddCubesConfiguration( this IConfigurationBuilder config, ICubesEnvironment cubesEnvironment) { config.AddCubesConfigurationProvider(cubesEnvironment); config.AddYamlFile( cubesEnvironment.GetFileOnPath(CubesFolderKind.Config, CubesConstants.Files_DataAccess), optional: true, reloadOnChange: true); config.AddYamlFile( cubesEnvironment.GetFileOnPath(CubesFolderKind.Config, CubesConstants.Files_StaticContent), optional: true, reloadOnChange: true); config.AddYamlFile( cubesEnvironment.GetFileOnPath(CubesFolderKind.Config, CubesConstants.Files_SmtpSettings), optional: true, reloadOnChange: true); // Installation specific application settings config.AddJsonFile( cubesEnvironment.GetFileOnPath(CubesFolderKind.Config, CubesConstants.Files_AppSettings), optional: true, reloadOnChange: true); return(config); }
public override IConfigurationBuilder ConfigureAppConfiguration(IConfigurationBuilder configuration, ICubesEnvironment cubes) { return(configuration.AddYamlFile( cubes.GetFileOnPath(CubesFolderKind.Config, SampleApplication.OptionsFile), optional: true, reloadOnChange: true)); }
public Scheduler( IJobFactory jobFactory, ISchedulerFactory schedulerFactory, ILogger <Scheduler> logger, IExecutionHistoryManager historyManager, ICubesEnvironment cubesEnvironment) { _schedulerFactory = schedulerFactory; _jobFactory = jobFactory; _logger = logger; _historyManager = historyManager; var configurationPath = cubesEnvironment .GetFileOnPath(CubesFolderKind.Config, CubesConstants.Files_Scheduling); _schedulerConfiguration = new ConfigurationBuilder() .AddYamlFile(configurationPath, optional: true, reloadOnChange: true) .Build(); }
public Scheduler( IJobFactory jobFactory, ISchedulerFactory schedulerFactory, ILogger <Scheduler> logger, ICubesEnvironment cubesEnvironment) { this.schedulerFactory = schedulerFactory; this.jobFactory = jobFactory; this.logger = logger; var configurationPath = cubesEnvironment .GetFileOnPath(CubesFolderKind.Settings, CubesConstants.Files_Scheduling); schedulerConfiguration = new ConfigurationBuilder() .AddYamlFile(configurationPath, optional: true, reloadOnChange: true) .Build(); schedulerConfiguration.OnChange(async() => await Reload()); }