public ServiceFacade(IBoxLocations boxLocations, IOSHelper oshelper, ILogger <ServiceFacade> logger, ILocalCallWatcher inbox, ILocalCallWatcher rcbox, IOrchExecutor orchExecutor) { this.boxLocations = boxLocations; this.oshelper = oshelper; this._logger = logger; this.InBoxFileWatcher = inbox ?? throw new ArgumentNullException("inbox"); this.RebootWatcher = rcbox ?? throw new ArgumentNullException("rcbox"); this.OrchExecutor = orchExecutor ?? throw new ArgumentNullException("orchExecutor"); }
public RecordProcessorManager( IBoxLocations boxLocations, ILogger <IRecordProcessorManager> logger, IRecordProcessorBase processor, IStringHelper stringHelper) { this.stringHelper = stringHelper; this.logger = logger; this.processor = processor; this.TaskId = processor.GUID; var fileInfo = new FileInfo(processor.ConfigFile); //configs for revealing processing stage this.ConfigFile = fileInfo.FullName; this.RunningConfigFile = Path.Combine(boxLocations.RunningDir, fileInfo.Name); this.EndConfigFile = Path.Combine(boxLocations.EndDir, fileInfo.Name); this.OutputFile = Path.Combine(boxLocations.OutputDir, fileInfo.Name); }
public RPCServerRegistry(ITokenToProcessorMapper mapper) : base() { this.mapper = mapper; this.IncludeRegistry <CommonRegistry>(); this.boxLocations = new BoxLocations(); For <IBoxLocations>().Use(this.boxLocations).Singleton(); this.ExecuteRecordBaseMappers(); this.ExecuteRecordManagerMappers(); //Manage the execution of a request For <IOrchExecutor>().Use <OrchExecutor>(); //Listeners for inbox and reboot-continue box For <ILocalCallWatcher>().Use <OrchFileWatcher>() .Ctor <string>("watchDir").Is(boxLocations.MonitoringDir).Named("inbox"); For <ILocalCallWatcher>().Use <OrchFileWatcher>() .Ctor <string>("watchDir").Is(boxLocations.RcDir).Named("rcbox"); //the service facade for hosting the service For <IServiceFacade>().Use <ServiceFacade>() .Ctor <ILocalCallWatcher>("inbox").IsNamedInstance("inbox") .Ctor <ILocalCallWatcher>("rcbox").IsNamedInstance("rcbox"); }
public OrchExecutor(ILogger <IOrchExecutor> logger, IExecutorFactory factory, IBoxLocations boxLocations) { this.boxLocations = boxLocations; this.logger = logger; this.recordFactory = factory; }