Exemplo n.º 1
0
        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();
        }