private async Task RefreshProfile()
        {
            MasterViewModel masterViewModel = this;

            try
            {
                if (!masterViewModel.HasInternetConnection)
                {
                    throw new NoInternetConnectionException().SetErrorCode <NoInternetConnectionException>("/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/ViewModels/MasterViewModel.cs", 507);
                }
                masterViewModel.IsLoading = true;
                masterViewModel._messenger.Publish <ProfileSyncMessage>((M0) new ProfileSyncMessage((object)masterViewModel, masterViewModel.IsLoading));
                masterViewModel._settings.RefreshProfileInProgress = true;
                // ISSUE: reference to a compiler-generated method
                await Task.Run(new Func <Task>(masterViewModel.\u003CRefreshProfile\u003Eb__60_0));

                masterViewModel._messenger.Publish <ActiveProfileChangedMessage>((M0) new ActiveProfileChangedMessage((object)masterViewModel, masterViewModel.ActiveProfile));
            }
            catch (Exception ex)
            {
                ErrorHandler.Current.HandleError(ex);
            }
            finally
            {
                masterViewModel.IsLoading = false;
                masterViewModel._settings.RefreshProfileInProgress = false;
                masterViewModel._messenger.Publish <ProfileSyncMessage>((M0) new ProfileSyncMessage((object)masterViewModel, masterViewModel.IsLoading));
            }
        }
        public virtual async void Start()
        {
            MasterViewModel masterViewModel = this;

            // ISSUE: reference to a compiler-generated method
            masterViewModel.\u003C\u003En__0();
            // ISSUE: reference to a compiler-generated method
            masterViewModel._messenger.Subscribe <ActiveProfileChangedMessage>((Action <M0>) new Action <ActiveProfileChangedMessage>(masterViewModel.\u003CStart\u003Eb__47_0), (MvxReference)1, (string)null);
            // ISSUE: reference to a compiler-generated method
            masterViewModel._messenger.Subscribe <ProfileSyncMessage>((Action <M0>) new Action <ProfileSyncMessage>(masterViewModel.\u003CStart\u003Eb__47_1), (MvxReference)1, (string)null);
            // ISSUE: reference to a compiler-generated method
            masterViewModel._messenger.Subscribe <NewsItemsRemovedMessage>((Action <M0>) new Action <NewsItemsRemovedMessage>(masterViewModel.\u003CStart\u003Eb__47_2), (MvxReference)1, (string)null);
            // ISSUE: reference to a compiler-generated method
            masterViewModel._messenger.Subscribe <NewsItemsReceivedMessage>((Action <M0>) new Action <NewsItemsReceivedMessage>(masterViewModel.\u003CStart\u003Eb__47_3), (MvxReference)1, (string)null);
            if (!masterViewModel.isIPad)
            {
                return;
            }
            try
            {
                // ISSUE: reference to a compiler-generated method
                await Task.Run(new Func <Task>(masterViewModel.\u003CStart\u003Eb__47_4)).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                ErrorHandler.Current.HandleError(ex);
            }
        }
        private async Task ShowProfiles()
        {
            MasterViewModel masterViewModel = this;

            masterViewModel.Busy();
            masterViewModel.HideSideBar();
            await Task.Delay(100);

            int num = await masterViewModel._navigationService.Navigate <ProfilesViewModel>((IMvxBundle)null, new CancellationToken()) ? 1 : 0;

            masterViewModel.NotBusy();
        }
        private async Task InitializeApp()
        {
            MasterViewModel masterViewModel = this;

            try
            {
                if (masterViewModel._securityService.IsDeviceRooted())
                {
                    await masterViewModel.ShowRootedDeviceAlert();
                }
                else
                {
                    masterViewModel.IsLoading = masterViewModel._settings.RefreshProfileInProgress = true;
                    masterViewModel._messenger.Publish <ProfileSyncMessage>((M0) new ProfileSyncMessage((object)masterViewModel, masterViewModel.IsLoading));
                    if (masterViewModel.ActiveProfile != null)
                    {
                        // ISSUE: reference to a compiler-generated method
                        ((MvxMainThreadDispatchingObject)masterViewModel).InvokeOnMainThread(new Action(masterViewModel.\u003CInitializeApp\u003Eb__53_0), true);
                        if (masterViewModel._pushMessage != null)
                        {
                            masterViewModel._messenger.Publish <DelayedOpenNotificationMessage>((M0) new DelayedOpenNotificationMessage((object)masterViewModel, masterViewModel._pushMessage));
                        }
                        if (!masterViewModel.HasInternetConnection)
                        {
                            masterViewModel._messenger.Publish <ActiveProfileChangedMessage>((M0) new ActiveProfileChangedMessage((object)masterViewModel, masterViewModel.ActiveProfile));
                            throw new NoInternetConnectionException().SetErrorCode <NoInternetConnectionException>("/Users/admin/myagent/macMiniBlack3/_work/2/s/eKreta.Mobile/eKreta.Mobile.Core.Standard/ViewModels/MasterViewModel.cs", 279);
                        }
                        Profile profile = await masterViewModel._refreshDataService.RefreshProfileAsync(masterViewModel.ActiveProfile, true);

                        masterViewModel.ActiveProfile = profile;
                        masterViewModel._messenger.Publish <ActiveProfileChangedMessage>((M0) new ActiveProfileChangedMessage((object)masterViewModel, masterViewModel.ActiveProfile));
                        await masterViewModel._profileDataService.DefaultPushRegistration();
                    }
                    else
                    {
                        // ISSUE: reference to a compiler-generated method
                        ((MvxMainThreadDispatchingObject)masterViewModel).InvokeOnMainThread(new Action(masterViewModel.\u003CInitializeApp\u003Eb__53_1), true);
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.Current.HandleError(ex);
            }
            finally
            {
                masterViewModel.IsLoading = masterViewModel._settings.RefreshProfileInProgress = false;
                masterViewModel._messenger.Publish <ProfileSyncMessage>((M0) new ProfileSyncMessage((object)masterViewModel, masterViewModel.IsLoading));
                MasterViewModel.initApp = true;
            }
        }
        public override async void ViewAppeared()
        {
            MasterViewModel masterViewModel = this;

            // ISSUE: reference to a compiler-generated method
            masterViewModel.\u003C\u003En__1();
            // ISSUE: method pointer
            masterViewModel._connectivity.remove_ConnectivityChanged(new ConnectivityChangedEventHandler((object)masterViewModel, __methodptr(ConnectivityChanged)));
            if (MasterViewModel.initApp || masterViewModel.isIPad)
            {
                return;
            }
            masterViewModel._messenger.Publish <ProfileSyncMessage>((M0) new ProfileSyncMessage((object)masterViewModel, masterViewModel.IsLoading));
            await masterViewModel.InitializeApp();
        }
        private async void ActiveProfileChangedMessageArrived()
        {
            MasterViewModel masterViewModel = this;

            masterViewModel.InitProfile();
            masterViewModel.Busy();
            List <Profile> allprofiles = masterViewModel._profileDataService.GetProfiles().ToList <Profile>();
            Credentials    credentials = ((ICredentialsDataService)Mvx.get_IoCProvider().Resolve <ICredentialsDataService>()).GetAllCredentials().FirstOrDefault <Credentials>((Func <Credentials, bool>)(x => allprofiles.All <Profile>((Func <Profile, bool>)(ap => ap.Id != x.UserId))));

            if (credentials != null)
            {
                IMvxNavigationService navigationService = masterViewModel._navigationService;
                Profile profile = new Profile();
                profile.Id = credentials.UserId;
                CancellationToken cancellationToken = new CancellationToken();
                int num = await navigationService.Navigate <NewProfileViewModel, Profile>((M1)profile, (IMvxBundle)null, cancellationToken) ? 1 : 0;
            }
            masterViewModel.NotBusy();
        }
        private async Task SelectMenuItem(MenuItem menuItem)
        {
            MasterViewModel masterViewModel = this;

            if (!menuItem.IsEnabled)
            {
                return;
            }
            masterViewModel.HideSideBar();
            if (menuItem.ViewModelType != (Type)null)
            {
                masterViewModel.Busy();
                await masterViewModel.ShowViewModelFromMaster(menuItem.ViewModelType);

                masterViewModel.NotBusy();
            }
            else if (menuItem.NavigationUrl != null)
            {
                masterViewModel.OpenUrl(menuItem.NavigationUrl);
            }
            masterViewModel.SelectedMenuItem = (MenuItem)null;
        }
        private async Task CheckNewVersionAvailable()
        {
            MasterViewModel masterViewModel = this;

            if (await masterViewModel._appVersionService.ShouldUpdateApp() && !masterViewModel._isVersionChecked)
            {
                if (await masterViewModel._modalDialog.DisplayVersionAlertAsync(masterViewModel._textProvider.GetText((string)null, (string)null, "Alert_Message_NewUpdateAvailable_Text"), masterViewModel._textProvider.GetText((string)null, (string)null, "Alert_Title_NewUpdateAvailable_Text"), masterViewModel._textProvider.GetText((string)null, (string)null, "Alert_Ok_NewUpdateAvailable_Button"), masterViewModel._textProvider.GetText((string)null, (string)null, "Alert_Cancel_NewUpdateAvailable_Button")))
                {
                    string str;
                    if (masterViewModel._systemInfo.Platform == "iOS")
                    {
                        str = await masterViewModel._appVersionService.IOSMobileStoreUrl();
                    }
                    else
                    {
                        str = await masterViewModel._appVersionService.AndroidMobileStoreUrl();
                    }
                    string targetUrl = str;
                    masterViewModel._webNavigation.OpenUrl(targetUrl);
                }
            }
            masterViewModel._isVersionChecked = true;
        }