Beispiel #1
0
        private void ShowRepositories()
        {
            var vm   = new UserRepositoriesViewModel();
            var task = vm.Load(_login.Username);

            Content = vm;
        }
        public T Execute(string username)
        {
            Guard.ArgumentNotNull(OnSuccess, "OnSuccess");
            Guard.ArgumentNotNull(OnFailed, "OnFailed");
            Guard.ArgumentNotNull(OnError, "OnError");
            Guard.ArgumentNotEmpty(username, "username");

            var model = new UserRepositoriesViewModel();

            model.User = GetGitUser(username);

            if (!Notifications.HasErrors())
            {
                model.Repositories = GetUserRepository(username);
            }

            if (Notifications.HasErrors())
            {
                return(OnError(Notifications));
            }

            return(Notifications.HasMessages() ?OnFailed(Notifications): OnSuccess(model));
        }