示例#1
0
 public override void Init(SubsystemConfig config)
 {
     _config = (ElectionManagerConfig)config;
     _votingResultManager = Application.GetSubsystemOrThrow <IVotingResultManager>();
     _recognitionManager  = Application.GetSubsystemOrThrow <IRecognitionManager>();
     _fileSystemManager   = Application.GetSubsystemOrThrow <IFileSystemManager>();
     _syncManager         = Application.GetSubsystemOrThrow <ISynchronizationManager>();
 }
示例#2
0
        /// <summary>
        ///     Ctor
        /// </summary>
        /// <param name="figureComparision">IFigureComparision for comparing figures</param>
        /// <param name="recognitionManager">IRecognitionManager for parse figure</param>
        public FigureManager(IFigureComparision figureComparision, IRecognitionManager recognitionManager)
        {
            Utils.ThrowIfNull(figureComparision, "IFigureComparision not set to instance of FigureManager");
            Utils.ThrowIfNull(recognitionManager, "IRecognitionManager not set to instance of FigureManager");

            FigureComparision  = figureComparision;
            RecognitionManager = recognitionManager;
            LoadFigures();
        }
        // private readonly ILogger _loggerGeneral;

        public RecognitionMicroService(IRecognitionManager manager, IOptions <RecognitionSettings> settings,
                                       ILogger <RecognitionMicroService> loggerSpecific)
        {
            // by checking in watch window loggerSpecific its private _logger field
            // we can see that it is instance of Serilog

            this._manager        = manager;
            this._settings       = settings.Value;
            this._loggerSpecific = loggerSpecific;
            // this._loggerGeneral = loggerGeneral;

            this._loggerSpecific.LogInformation("[INFO SPECIFIC]: RecognitionMicroService created");
            // this._loggerGeneral.LogInformation("[INFO GENERAL]: RecognitionMicroService created");
        }
示例#4
0
        protected override void Initialize(WorkflowExecutionContext context)
        {
            base.Initialize(context);
            var app = CoreApplication.Instance;

            _workflowManager     = app.GetSubsystemOrThrow <IWorkflowManager>();
            _scannerManager      = app.GetSubsystemOrThrow <IScannerManager>();
            _electionManager     = app.GetSubsystemOrThrow <IElectionManager>();
            _votingResultManager = app.GetSubsystemOrThrow <IVotingResultManager>();
            _syncManager         = app.GetSubsystemOrThrow <ISynchronizationManager>();
            _soundManager        = app.GetSubsystemOrThrow <ISoundManager>();
            _keyboard            = app.GetSubsystemOrThrow <UnionKeyboard>();
            _configManager       = app.GetSubsystemOrThrow <IConfigurationManager>();
            _fileSystemManager   = app.GetSubsystemOrThrow <IFileSystemManager>();
            _printingManager     = app.GetSubsystemOrThrow <IPrintingManager>();
            _recognitionManager  = app.GetSubsystemOrThrow <IRecognitionManager>();
            _logger = _workflowManager.Logger;
        }
示例#5
0
 public override void Init(SubsystemConfig config)
 {
     _electionManager = Application.GetSubsystemOrThrow<IElectionManager>();
     _votingResultManager = Application.GetSubsystemOrThrow<IVotingResultManager>();
     _recognitionManager = Application.GetSubsystemOrThrow<IRecognitionManager>();
     _sheetProcessingSession = SheetProcessingSession.GetClosedSheetProcessingSession(Logger);
     ApplyNewConfig(config);
 }
示例#6
0
 protected override void Initialize(WorkflowExecutionContext context)
 {
     base.Initialize(context);
     var app = CoreApplication.Instance;
     _workflowManager = app.GetSubsystemOrThrow<IWorkflowManager>();
     _scannerManager = app.GetSubsystemOrThrow<IScannerManager>();
     _electionManager = app.GetSubsystemOrThrow<IElectionManager>();
     _votingResultManager = app.GetSubsystemOrThrow<IVotingResultManager>();
     _syncManager = app.GetSubsystemOrThrow<ISynchronizationManager>();
     _soundManager = app.GetSubsystemOrThrow<ISoundManager>();
     _keyboard = app.GetSubsystemOrThrow<UnionKeyboard>();
     _configManager = app.GetSubsystemOrThrow<IConfigurationManager>();
     _fileSystemManager = app.GetSubsystemOrThrow<IFileSystemManager>();
     _printingManager = app.GetSubsystemOrThrow<IPrintingManager>();
     _recognitionManager = app.GetSubsystemOrThrow<IRecognitionManager>();
     _logger = _workflowManager.Logger;
 }
示例#7
0
 public override void Init(SubsystemConfig config)
 {
     _config = (ElectionManagerConfig)config;
     _votingResultManager = Application.GetSubsystemOrThrow<IVotingResultManager>();
     _recognitionManager = Application.GetSubsystemOrThrow<IRecognitionManager>();
     _fileSystemManager = Application.GetSubsystemOrThrow<IFileSystemManager>();
     _syncManager = Application.GetSubsystemOrThrow<ISynchronizationManager>();
 }