Beispiel #1
0
 public MainWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader, IAnalyticsLogger analyticsLogger)
 {
     AppIconPath        = appInfo.AppIconPath;
     _logger            = logger;
     _contentDownloader = contentDownloader;
     _analyticsLogger   = analyticsLogger;
 }
 internal DownloadWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger,
                                  IRemoteContentDownloader contentDownloader)
 {
     AppIconPath        = appInfo.AppIconPath;
     _logger            = logger;
     _contentDownloader = contentDownloader;
 }
Beispiel #3
0
 public MagpieService(AppInfo appInfo, IDebuggingInfoLogger debuggingInfoLogger = null)
 {
     _appInfo = appInfo;
     _logger = debuggingInfoLogger ?? new DebuggingWindowViewModel();
     RemoteContentDownloader = new DefaultRemoteContentDownloader();
     UpdateDecider = new UpdateDecider(_logger);
 }
Beispiel #4
0
 public MainWindowViewModel(AppInfo appInfo, IDebuggingInfoLogger logger, IRemoteContentDownloader contentDownloader, IAnalyticsLogger analyticsLogger)
 {
     AppIconPath = appInfo.AppIconPath;
     _logger = logger;
     _contentDownloader = contentDownloader;
     _analyticsLogger = analyticsLogger;
 }
Beispiel #5
0
 public MockMagpie(string validUrl, IDebuggingInfoLogger infoLogger = null, IAnalyticsLogger analyticsLogger = null)
     : base(new AppInfo(validUrl), infoLogger, analyticsLogger)
 {
     _remoteContentDownloader = Substitute.For <IRemoteContentDownloader>();
     _remoteContentDownloader.DownloadStringContent(validUrl, Arg.Any <IDebuggingInfoLogger>()).Returns(Task.FromResult(VALID_JSON));
     RemoteContentDownloader = _remoteContentDownloader;
 }
Beispiel #6
0
 public MockMagpieUpdater(string validUrl, IDebuggingInfoLogger infoLogger = null) : base(new AppInfo(validUrl), infoLogger)
 {
     var validJson = VALID_JSON.Replace("'", "\"");
     _remoteContentDownloader = Substitute.For<IRemoteContentDownloader>();
     _remoteContentDownloader.DownloadStringContent(validUrl).Returns(Task.FromResult(validJson));
     base.RemoteContentDownloader = _remoteContentDownloader;
 }
Beispiel #7
0
 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);
 }
Beispiel #8
0
 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.LogUserSkipsUpdate(new Channel()));
     RemindMeLaterCommand   = new DelegateCommand(message => analyticsLogger.LogRemindMeLater());
 }
Beispiel #9
0
 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);
 }
Beispiel #10
0
        public MockMagpieUpdater(string validUrl, IDebuggingInfoLogger infoLogger = null) : base(new AppInfo(validUrl), infoLogger)
        {
            var validJson = VALID_JSON.Replace("'", "\"");

            _remoteContentDownloader = Substitute.For <IRemoteContentDownloader>();
            _remoteContentDownloader.DownloadStringContent(validUrl).Returns(Task.FromResult(validJson));
            base.RemoteContentDownloader = _remoteContentDownloader;
        }
Beispiel #11
0
        public void Initialize()
        {
            AssemblyInjector.Inject();
            var appInfo = new AppInfo("test_url")
            {
                AppIconPath = "icon_path"
            };

            _remoteContentDownloader = Substitute.For <IRemoteContentDownloader>();
            _sut = new DownloadWindowViewModel(appInfo, Substitute.For <IDebuggingInfoLogger>(), _remoteContentDownloader);
        }
 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;
 }