Пример #1
0
 public ApiClient(IFExConfig config, ILoggingService trace, Guid correlationId)
 {
     this.config    = config;
     this.trace     = trace;
     requestFactory = new RequestFactory(correlationId);
     requestClient  = new RestClient(config.RecodifyFExUrl);
 }
Пример #2
0
 public CalculateNextRunDateJob(DynamicsRepository repo, IFExConfig config, ILoggingService trace, int depth, Guid correlationId)
 {
     this.repo          = repo;
     this.config        = config;
     this.trace         = trace;
     this.depth         = depth;
     this.correlationId = correlationId;
 }
Пример #3
0
 public RateSyncJob(DynamicsRepository repository, IOrganizationService organisationService, IFExConfig config,
                    ILoggingService trace, Guid correlationId)
 {
     this.organisationService = organisationService;
     this.config = config;
     this.trace  = trace;
     repo        = repository;
     rateService = new RateService(config, trace, correlationId);
     rateSyncer  = new RateSyncer(config, trace);
 }
Пример #4
0
        protected void HandleException(
            Exception exp,
            string message,
            IFExConfig config,
            IOrganizationService organisationService,
            ILoggingService trace)
        {
            trace.Trace(TraceEventType.Error, 1, message);
            trace.Trace(TraceEventType.Error, 1, exp);
            new JobCompleter(organisationService, config, trace).Complete(RunStatus.Error);

            // In Dynamics you cannot throw custom exceptions as serilization of them requires reflection which
            // is not permitted in an exectuion sandbox.
            throw new InvalidPluginExecutionException(message);
        }
Пример #5
0
 public JobCompleter(IOrganizationService organisationService, IFExConfig config, ILoggingService trace)
 {
     this.organisationService = organisationService;
     this.config = config;
     this.trace  = trace;
 }
Пример #6
0
 public virtual void SaveNextRunDate(IFExConfig config, DateTime nextRunDate)
 {
     config.NextRunDate = nextRunDate;
     config.RemoveNonPersistableAttributes();
     organisationService.Update(config.Entity);
 }
Пример #7
0
 public override void SaveNextRunDate(IFExConfig config, DateTime nextRunDate)
 {
     base.SaveNextRunDate(config, nextRunDate);
     SaveNextRunDateCallCount++;
 }
Пример #8
0
 public RateSyncer(IFExConfig config, ILoggingService trace)
 {
     this.config = config;
     this.trace  = trace;
 }
Пример #9
0
 public RateService(IFExConfig config, ILoggingService trace, Guid correlationId)
 {
     api = new ApiClient(config, trace, correlationId);
 }