public SystemProcessOperationContext(
            ISystemProcessContext systemProcessContext,
            ISystemProcessOperationRepository systemProcessOperationRepository,
            ISystemProcessOperationRunRuleContextFactory runRuleContextFactory,
            ISystemProcessOperationDistributeRuleContextFactory distributeRuleContextFactory,
            ISystemProcessOperationFileUploadContextFactory uploadFileFactory,
            ISystemProcessOperationDataRequestContextFactory dataRequestFactory,
            IOperationLogging operationLogging)
        {
            this._systemProcessContext =
                systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));

            this._systemProcessOperationRepository = systemProcessOperationRepository
                                                     ?? throw new ArgumentNullException(
                                                               nameof(systemProcessOperationRepository));

            this._runRuleContextFactory =
                runRuleContextFactory ?? throw new ArgumentNullException(nameof(runRuleContextFactory));

            this._distributeRuleContextFactory = distributeRuleContextFactory
                                                 ?? throw new ArgumentNullException(
                                                           nameof(distributeRuleContextFactory));

            this._uploadFileFactory = uploadFileFactory ?? throw new ArgumentNullException(nameof(uploadFileFactory));

            this._dataRequestFactory =
                dataRequestFactory ?? throw new ArgumentNullException(nameof(dataRequestFactory));

            this._operationLogging = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));
        }
 public SystemProcessOperationRunRuleContextFactory(
     ISystemProcessOperationRuleRunRepository repository,
     IOperationLogging operationLogging)
 {
     this._repository       = repository ?? throw new ArgumentNullException(nameof(repository));
     this._operationLogging = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));
 }
Exemplo n.º 3
0
 public SystemProcessOperationFileUploadContextFactory(
     IOperationLogging operationLogging,
     ISystemProcessOperationUploadFileRepository repository)
 {
     this._operationLogging = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));
     this._repository       = repository ?? throw new ArgumentNullException(nameof(repository));
 }
 public SystemProcessOperationDataRequestContextFactory(
     ISystemProcessOperationThirdPartyDataRequestRepository repository,
     IOperationLogging operationLogging)
 {
     this._repository       = repository ?? throw new ArgumentNullException(nameof(repository));
     this._operationLogging = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));
 }
Exemplo n.º 5
0
        public SystemProcessOperationDistributeRuleContext(
            ISystemProcessOperationContext processOperationContext,
            ISystemProcessOperationDistributeRuleRepository repository,
            IOperationLogging operationLogging)
        {
            this._processOperationContext = processOperationContext
                                            ?? throw new ArgumentNullException(nameof(processOperationContext));

            this._repository = repository ?? throw new ArgumentNullException(nameof(repository));

            this._operationLogging = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));
        }
Exemplo n.º 6
0
 public SystemProcessOperationContextFactory(
     ISystemProcessOperationRepository operationContext,
     ISystemProcessOperationRunRuleContextFactory ruleRunRepository,
     ISystemProcessOperationDistributeRuleContextFactory distributeRuleFactory,
     IOperationLogging operationLogging,
     ISystemProcessOperationFileUploadContextFactory fileUploadFactory,
     ISystemProcessOperationDataRequestContextFactory dataRequestFactory)
 {
     this._operationRepository   = operationContext ?? throw new ArgumentNullException(nameof(operationContext));
     this._ruleRunFactory        = ruleRunRepository ?? throw new ArgumentNullException(nameof(ruleRunRepository));
     this._distributeRuleFactory =
         distributeRuleFactory ?? throw new ArgumentNullException(nameof(distributeRuleFactory));
     this._operationLogging   = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));
     this._fileUploadFactory  = fileUploadFactory ?? throw new ArgumentNullException(nameof(fileUploadFactory));
     this._dataRequestFactory =
         dataRequestFactory ?? throw new ArgumentNullException(nameof(dataRequestFactory));
 }
Exemplo n.º 7
0
        public SystemProcessContext(
            ISystemProcessRepository systemProcessRepository,
            ISystemProcessOperationContextFactory factory,
            IOperationLogging operationLogging)
        {
            this._systemProcessRepository = systemProcessRepository
                                            ?? throw new ArgumentNullException(nameof(systemProcessRepository));
            this._factory          = factory ?? throw new ArgumentNullException(nameof(factory));
            this._operationLogging = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));

            var systemProcess = new SystemProcess
            {
                Heartbeat         = DateTime.UtcNow,
                InstanceInitiated = DateTime.UtcNow,
                MachineId         = Environment.MachineName,
                ProcessId         = Process.GetCurrentProcess()?.Id.ToString(),
                SystemProcessType = ProcessType
            };

            systemProcess.Id = systemProcess.GenerateInstanceId();

            this.StartEvent(systemProcess);
        }