public InstallationManager(Config config, DownloadListManager downloadListManager, LanguageProvider languageProvider, PictogramRestService pictogramRestService) { _config = config; _downloadListManager = downloadListManager; this.languageProvider = languageProvider; this.pictogramRestService = pictogramRestService; }
/// <summary> /// Skapar en ny instans av klassen. /// </summary> public DownloadManager(LanguageProvider languageProvider, PictogramRestService pictogramRestService) { if (languageProvider == null) { throw new NullReferenceException("Language provider cannot be null"); } this._languageProvider = languageProvider; if (pictogramRestService == null) { throw new NullReferenceException("Pictogram REST service cannot be null"); } this.pictogramRestService = pictogramRestService; }
/// <summary> /// Should be refactored to use proper dependency injection. /// </summary> private void createDependencyGraph() { this.fileLogger = new FileLogger(); this._languageSelection = new LanguageSelection(); this._authenticationService = new AuthenticationService(); this.categoryRepository = new CategoryRepository(); this.categoryTranslationService = new CategoryTranslationService(); this.pictogramRestService = new PictogramRestService("www.pictogram.se"); this.languageProvider = new LanguageProvider(this.pictogramRestService); this.iniFileFactory = new IniFileFactory(); this.config = new Config(this.categoryRepository, this.categoryTranslationService, this.iniFileFactory); this.downloadManager = new DownloadManager(this.languageProvider, this.pictogramRestService); this.downloadListManager = new DownloadListManager(this.pictogramRestService); this.installationManager = new InstallationManager(this.config, this.downloadListManager, this.languageProvider, this.pictogramRestService); this.imageFormatProvider = new ImageFormatProvider(); this.hargdata = new HargdataProducts(); }
/// <summary> /// Should be refactored to use proper dependency injection. /// </summary> private void createDependencyGraph() { this._languageSelection = new LanguageSelection(); this._authenticationService = new AuthenticationService(); this.categoryRepository = new CategoryRepository(); this.categoryTranslationService = new CategoryTranslationService(); this.languageProvider = new LanguageProvider(); this.pictosysWebService = new PictosysWebService(); this._config = new Config(this.categoryRepository, this.categoryTranslationService); this.downloadManager = new DownloadManager(this.languageProvider, this.pictosysWebService); this.downloadListManager = new DownloadListManager(this.pictosysWebService); this.installationManager = new InstallationManager(this._config, this.downloadListManager, this.languageProvider, this.pictosysWebService); }