Beispiel #1
0
        public AppInfo()
        {
            InitializeComponent();
            On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);

            VM             = new AppInfoViewModel(_xeAppInfo);
            BindingContext = VM;
        }
        public async Task <IActionResult> Info()
        {
            var appInfoViewModel = new AppInfoViewModel();

            appInfoViewModel.LastRequestTime = await _cache.GetStringAsync(_keyResolver.GetKeyWithPrefix(Keys.LastRequestTime));

            await HttpContext.Session.LoadAsync();

            appInfoViewModel.CurrentUserLastRequestTime = HttpContext.Session.GetString(Keys.LastRequestTime);

            var redisValue = await _redis.GetDatabase().StringGetAsync(new RedisKey("Counter"));

            appInfoViewModel.RedisCounter = redisValue.ToString();

            return(View(appInfoViewModel));
        }
        // ReSharper disable once MemberCanBeInternal
        public AppInfoPage(RegisteredAppModel appModelInfo)
        {
            InitializeComponent();
            BindingContext = new AppInfoViewModel(appModelInfo);

            MessagingCenter.Subscribe <AppInfoViewModel>(
                this,
                MessengerConstants.NavHomePage,
                async _ =>
            {
                MessageCenterUnsubscribe();
                if (!App.IsPageValid(this))
                {
                    return;
                }

                await Navigation.PopAsync();
            });
        }
 // ReSharper disable once MemberCanBeInternal
 public AppInfoPage(RegisteredAppModel appModelInfo)
 {
     InitializeComponent();
     BindingContext = new AppInfoViewModel(appModelInfo);
 }