Ejemplo n.º 1
0
        private IncrementalServiceOptions FillSecureOptions(IncrementalServiceOptions options)
        {
            // put your own secure implementation of how to get these information
            options.Username           = "";
            options.Password           = "";
            options.DBConnectionString = "Server=(local);Integrated Security=SSPI;Database=DataExtractor";

            return(options);
        }
Ejemplo n.º 2
0
        private async Task <bool> InitAsync()
        {
            _jobManager        = new JobManager();
            _controller        = new Controller();
            _jobAndTaskService = new JobAndTaskService();

            _startOptions = GetOptions();

            if (_startOptions == null)
            {
                _log.Error("Incremental Extraction Service: failed to populate start options.");
                throw new Exception("Incremental Extraction Service: failed to populate start options.");
            }

            if (!await _controller.SetDBSettingsAsync(_startOptions))
            {
                _log.Error("Incremental Extraction Service: failed to log in to Database.");
                throw  new Exception("Incremental Extraction Service: failed to log in to Database.");
            }

            if (!await _controller.InitApiRequestAsync(_startOptions))
            {
                _log.Error("Incremental Extraction Service: failed to get access token.");
                throw new Exception("Incremental Extraction Service: failed to get access token.");
            }

            //Load the EnumFile
            if (!await _controller.InitStartEnumDownloadAsync())
            {
                _log.Error("Incremental Extraction Service: failed to load EnumSet, refer to Controller.InitStartEnumDownloadAsync log entry for more details.");
                throw new Exception("Incremental Extraction Service: failed to load EnumSet.");
            }

            //Initialize TaskEnumUtility
            _controller.SetEndPoints(_startOptions);

            return(true);
        }