Esempio n. 1
0
        public static string GetJobType(IJobSettings job)
        {
            if (job is DataUpdateJobSettings) return DataUpdate;
            if (job is EconomicReleaseUpdateJobSettings) return EconomicRelease;

            return "";
        }
Esempio n. 2
0
        private IJobViewModel GetJobViewModel(IJobSettings job)
        {
            if (job is DataUpdateJobSettings)
            {
                return(new DataUpdateJobViewModel((DataUpdateJobSettings)job, _client, DialogCoordinator, this));
            }
            if (job is EconomicReleaseUpdateJobSettings)
            {
                return(new EconomicReleaseUpdateJobViewModel((EconomicReleaseUpdateJobSettings)job, _client, DialogCoordinator, this));
            }
            if (job is DividendUpdateJobSettings)
            {
                return(new DividendUpdateJobViewModel((DividendUpdateJobSettings)job, _client, DialogCoordinator, this));
            }
            if (job is EarningsUpdateJobSettings)
            {
                return(new EarningsUpdateJobViewModel((EarningsUpdateJobSettings)job, _client, DialogCoordinator, this));
            }

            throw new NotImplementedException();
        }
Esempio n. 3
0
        private string GetJobPathFromType(IJobSettings job)
        {
            if (job is DataUpdateJobSettings)
            {
                return("/jobs/dataupdatejobs");
            }
            if (job is EconomicReleaseUpdateJobSettings)
            {
                return("/jobs/economicreleaseupdatejobs");
            }
            if (job is DividendUpdateJobSettings)
            {
                return("/jobs/dividendupdatejobs");
            }
            if (job is EarningsUpdateJobSettings)
            {
                return("/jobs/earningsupdatejobs");
            }

            throw new NotImplementedException();
        }
Esempio n. 4
0
        public static string GetJobType(IJobSettings job)
        {
            if (job is DataUpdateJobSettings)
            {
                return(DataUpdate);
            }
            if (job is EconomicReleaseUpdateJobSettings)
            {
                return(EconomicRelease);
            }
            if (job is DividendUpdateJobSettings)
            {
                return(DividendUpdate);
            }
            if (job is EarningsUpdateJobSettings)
            {
                return(EarningsUpdate);
            }

            return("");
        }
Esempio n. 5
0
        private void AddJob(string selectedJob)
        {
            IJobSettings job = null;

            //create the jobdetails and add
            if (selectedJob == "Data Update")
            {
                job = new DataUpdateJobSettings {
                    Name = GetJobName("DataUpdateJob"), UseTag = true, Frequency = BarSize.OneDay, Time = new TimeSpan(8, 0, 0), WeekDaysOnly = true
                };
            }
            else if (selectedJob == "Economic Release Update")
            {
                job = new EconomicReleaseUpdateJobSettings {
                    Name = GetJobName("EconomicReleaseUpdateJob"), BusinessDaysBack = 1, BusinessDaysAhead = 7, DataSource = "FXStreet"
                };
            }

            var jobVm = GetJobViewModel(job);

            Jobs.Add(jobVm);
            SelectedJob = jobVm;
        }
Esempio n. 6
0
 public void DeleteJob(IJobSettings job)
 {
     _logger.Info($"Deleting job {JobTypes.GetJobType(job)}.{job.Name}");
     _scheduler.DeleteJob(new JobKey(job.Name, JobTypes.GetJobType(job)));
 }
Esempio n. 7
0
 public HeartBeatJob(IServices services, IAdminServices adminServices, IJobSettings settings)
     : base(services, adminServices, settings)
 {
 }
 public SendInvoiceJob(IServices services, IAdminServices adminServices, IJobSettings settings)
     : base(services, adminServices, settings)
 {
 }
Esempio n. 9
0
 public CreateRCTIJob(IServices services, IAdminServices adminServices, IJobSettings settings)
     : base(services, adminServices, settings)
 {
 }
 public NotifyBeforeEndTimeJob(IServices services, IAdminServices adminServices, IJobSettings settings)
     : base(services, adminServices, settings)
 {
 }
 protected BaseScheduledJob(IServices services, IAdminServices adminServices, IJobSettings settings)
 {
     Services = services;
     AdminServices = adminServices;
     JobSettings = settings;
 }
Esempio n. 12
0
 public ClearLogsJob(IServices services, IAdminServices adminServices, IJobSettings settings)
     : base(services, adminServices, settings)
 {
 }
 public CheckTrialUserJob(IServices services, IAdminServices adminServices, IJobSettings settings)
     : base(services, adminServices, settings)
 {
 }
Esempio n. 14
0
 public static void ScheduleJob(IScheduler scheduler, IJobSettings job)
 {
     ScheduleJobs(scheduler, new[] { job });
 }
 public DownloadRecordJob(IServices services, IAdminServices adminServices, IJobSettings settings)
     : base(services, adminServices, settings)
 {
 }