public UpdateAvailableViewModel() { // This should be initialized by an IoC container and passed in as a constructor parameter CheckForUpdatesService = new CheckForUpdatesService(); PageAppearingCommand = new Command <bool>(async(bool isUpdateRequired) => { IsUpdateRequired = isUpdateRequired; await CreateUpdateInfoHtmlContentAsync(); }); InstallUpdateCommand = new Command(InstallUpdate); IgnoreUpdateCommand = new Command(IgnoreUpdate); }
public MainPageViewModel() { AppVersionService = DependencyService.Get <IAppVersionService>(); CheckForUpdatesService = new CheckForUpdatesService(); CheckForUpdatesCommand = new Command(CheckForUpdates); }