예제 #1
0
 public SchedulesApplication()
 {
     mgr = new SchedulesManager(
         ObjectFactory.GetInstance <IEmailSender>(),
         ObjectFactory.GetInstance <ISchedulesRepository>()
         );
 }
        public UpdateSchedulesWorker(Context context, WorkerParameters workerParameters)
            : base(context, workerParameters)
        {
            _application = ApplicationContext as SmtuScheduleApplication;

            _localSchedulesManager = new SchedulesManager(
                _application.GetModernExternalStoragePath(),
                SmtuScheduleApplication.SchedulesDirectoryName
                );
        }
예제 #3
0
        public Boolean Initialize()
        {
            String externalStoragePath = GetExternalStoragePath();

            if (!Directory.Exists(externalStoragePath))
            {
                try
                {
                    Directory.CreateDirectory(externalStoragePath);
                }
                catch
                {
                    return(false);
                }
            }

            Manager = new SchedulesManager(externalStoragePath)
            {
                Logger = Logger
            };

            return(IsInitialized = true);
        }
 public TestConfigurationLoader()
 {
     config  = new ConfigurationBuilder().AddJsonFile("test.appsettings.json").Build();
     json    = File.ReadAllText("test.appsettings.json");
     manager = new SchedulesManager();
 }