public CompareInAppHosting() { jobTasks = new Dictionary <Job, CancellationTokenSource>(); duplicates = new Compare.Duplicates(); _logger = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger)); _repository = (Jobs.IJobRepository)Bootstrap.Instance.Services.GetService(typeof(Jobs.IJobRepository)); _folderRepository = (Folders.IFolderRepository)Bootstrap.Instance.Services.GetService(typeof(Folders.IFolderRepository)); _jobServiceRepository = (IJobServiceRepository)Bootstrap.Instance.Services.GetService(typeof(IJobServiceRepository)); _duplicatesManager = (Duplicates.IDuplicatesManager)Bootstrap.Instance.Services.GetService(typeof(Duplicates.IDuplicatesManager)); _mainManager = (IMainManager)Bootstrap.Instance.Services.GetService(typeof(IMainManager)); _mainManager.ApplicationClosing += _mainManager_ApplicationClosing; _mainManager.ApplicationStarting += _mainManager_ApplicationStarting; }
public JobService() { _logger = (Internal.ILogger)Bootstrap.Instance.Services.GetService(typeof(Internal.ILogger)); _repository = (Jobs.IJobRepository)Bootstrap.Instance.Services.GetService(typeof(Jobs.IJobRepository)); _compare = (ICompare)Bootstrap.Instance.Services.GetService(typeof(ICompare)); }