public Installer( AppSourceConfig appSourceConfig, MtgjsonSourceConfig mtgjsonSourceConfig, CardSearcher cardSearcher, KeywordSearcher keywordSearcher) { _appSourceConfig = appSourceConfig; _mtgjsonSourceConfig = mtgjsonSourceConfig; _updateAppDir = AppDir.Update.AddPath("app"); _appOnlineSignatureFile = Path.Combine(_updateAppDir, Signer.SignaturesFile); _appDownloadedSignatureFile = AppDir.Update.AddPath(Signer.SignaturesFile); _appInstalledVersionFile = AppDir.Update.AddPath("version.txt"); AppDownloadedSignature = getAppDownloadedSignature(); _webClient = new WebClientBase(); _megatools = new Megatools(); _protectedFiles = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase) { AppDir.GeneralConfigXml, AppDir.DisplayConfigXml, cardSearcher.IndexDirectory.AddPath("*.*"), cardSearcher.Spellchecker.IndexDirectory.AddPath("*.*"), keywordSearcher.IndexDirectory.AddPath("*.*") }; }
public NewsService(AppSourceConfig appSourceConfig) { _appSourceConfig = appSourceConfig; string newsDir = AppDir.Update.AddPath("notifications"); _newsArchive = newsDir.AddPath("archive.zip"); _unzippedNewsDir = newsDir.AddPath("archive"); _unreadNewsDir = newsDir.AddPath("new"); _readNewsDir = newsDir.AddPath("read"); Directory.CreateDirectory(_unzippedNewsDir); Directory.CreateDirectory(_unreadNewsDir); Directory.CreateDirectory(_readNewsDir); }
[UsedImplicitly] // by ninject public NewsService(AppSourceConfig appSourceConfig) { _appSourceConfig = appSourceConfig; FsPath newsDir = AppDir.Update.Join("notifications"); _newsArchive = newsDir.Join("archive.zip"); _unzippedNewsDir = newsDir.Join("archive"); _unreadNewsDir = newsDir.Join("new"); _readNewsDir = newsDir.Join("read"); _unzippedNewsDir.CreateDirectory(); _unreadNewsDir.CreateDirectory(); _readNewsDir.CreateDirectory(); }
[UsedImplicitly] // by ninject public Installer( AppSourceConfig appSourceConfig, MtgjsonSourceConfig mtgjsonSourceConfig) { _appSourceConfig = appSourceConfig; _mtgjsonSourceConfig = mtgjsonSourceConfig; _updateAppDir = AppDir.Update.Join("app"); _appOnlineSignatureFile = _updateAppDir.Join(Signer.SignaturesFile); _appDownloadedSignatureFile = AppDir.Update.Join(Signer.SignaturesFile); _appInstalledVersionFile = AppDir.Update.Join("version.txt"); AppDownloadedSignature = getAppDownloadedSignature(); _webClient = new WebClientBase(); _protectedFiles = new HashSet <FsPath> { AppDir.GeneralConfigXml, AppDir.DisplayConfigXml, }; }
public Megatools(AppSourceConfig config) { _megatoolsUrl = config.MegatoolsUrl; }
[UsedImplicitly] // by ninject public Megatools(AppSourceConfig config) { _megatoolsUrl = config.MegatoolsUrl; _yandexKey = config.YandexKey; }