public MainWindow() { InitializeComponent(); var appInfo = new AppInfo(); appInfo.SetAppIcon("Magpie.Example", "lp.png"); new MagpieService(appInfo).RunInBackground("https://dl.dropboxusercontent.com/u/83257/Updaters/Magpie/appcast.json"); }
public MagpieService(AppInfo appInfo, IDebuggingInfoLogger debuggingInfoLogger = null) { _appInfo = appInfo; _logger = debuggingInfoLogger ?? new DebuggingWindowViewModel(); RemoteContentDownloader = new DefaultRemoteContentDownloader(); UpdateDecider = new UpdateDecider(_logger); }
public MainWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader, IAnalyticsLogger analyticsLogger) { AppIconPath = appInfo.AppIconPath; _logger = logger; _contentDownloader = contentDownloader; _analyticsLogger = analyticsLogger; }
public MagpieUpdater(AppInfo appInfo, IDebuggingInfoLogger debuggingInfoLogger = null, IAnalyticsLogger analyticsLogger = null) { _appInfo = appInfo; _logger = debuggingInfoLogger ?? new DebuggingWindowViewModel(); _analyticsLogger = analyticsLogger ?? new AnalyticsLogger(); RemoteContentDownloader = new DefaultRemoteContentDownloader(); UpdateDecider = new UpdateDecider(_logger); }
public void Initialize() { var debuggingInfoLogger = Substitute.For<IDebuggingInfoLogger>(); _analyticsLogger = Substitute.For<IAnalyticsLogger>(); var remoteContentDownloader = Substitute.For<IRemoteContentDownloader>(); var appInfo = new AppInfo("valid_url"); _appCast = new MockRemoteAppcast(new Version(1, 0)); _mainWindowViewModel = new MockMainWindowViewModel(appInfo, debuggingInfoLogger, remoteContentDownloader, _analyticsLogger); }
public SignatureVerificationWindowViewModel(AppInfo appInfo, RemoteAppcast appcast) { AppIconPath = appInfo.AppIconPath; Title = string.Format(Properties.Resources.SignatureErrorTitle, appcast.Title); }
private static AppInfo MakeAppInfo() { var appInfo = new AppInfo("https://dl.dropboxusercontent.com/u/83257/Updaters/Magpie/appcast.json"); appInfo.SetAppIcon("Magpie.Example", "logo64x64.tiff"); return appInfo; }
public MockMainWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader, IAnalyticsLogger analyticsLogger) : base(appInfo, logger, contentDownloader, analyticsLogger) { DownloadNowCommand = new DelegateCommand(message=> analyticsLogger.LogDownloadNow()); SkipThisVersionCommand = new DelegateCommand(message => analyticsLogger.LogSkipThisVersion()); RemindMeLaterCommand = new DelegateCommand(message => analyticsLogger.LogRemindMeLater()); }
internal DownloadWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader) { AppIconPath = appInfo.AppIconPath; _logger = logger; _contentDownloader = contentDownloader; }