Exemple #1
0
        async public Task <ServerStatus> GetUserAsync(WPPod.Models.User userSeed)
        {
            ServerStatus status = new ServerStatus(
                ServerStatus.NEST_RESULT_ERROR);

            if (IsBusy)
            {
                return(status);
            }

            IsBusy = true;

            try
            {
                status = await ResultSingle <WPPod.Models.User> .WaitForObjectAsync(
                    false, userSeed, new CachedHttpRequest <WPPod.Models.User>(
                        NesterControl.DeployedApp.QueryAsync), false);

                if (status.Code >= 0)
                {
                    _user = status.PayloadToObject <WPPod.Models.User>();
                    OnPropertyChanged("EditUser");
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }

            return(status);
        }
Exemple #2
0
 public UserViewModel(Inkton.Nester.Models.App app = null)
     : base(app)
 {
     _user = new WPPod.Models.User();
 }