Inheritance: BoolModel
コード例 #1
0
        public RepositoryDataModel()
        {
            var user = new User
            {
                Login = "******",
                AvatarUrl = "https://secure.gravatar.com/avatar/5c4663b12b9e6d8dc6dcdfbfb3dc1317",
            };

            Repository = new Repository
            {
                Owner = user,
                Name = "symfony",
                HtmlUrl = "http://github.com/michelsalib/symfony",
                Description = "The Symfony2 PHP framework",
                Watchers = 3,
                Forks = 1,
                Homepage = "symfony.com",
                Parent = new Repository
                {
                    Owner = user,
                    Name = "symfnoy"
                }
            };

            Tree = new GitTree()
            {
                Tree = new List<Gi7.Client.Model.GitHubFile>()
                {
                    new Gi7.Client.Model.GitHubFile() {
                        Path = "readme.md",
                        Type = "blob",
                    },
                    new Gi7.Client.Model.GitHubFile() {
                        Path = "dir",
                        Type = "tree",
                    },
                }
            };

            Commits = new ObservableCollection<Push>
            {
                new Push
                {
                    Author = user,
                    Commit = new Commit
                    {
                        Message = "Removing static access to Username on github service",
                        Author = new Committer
                        {
                            Date = DateTime.Now,
                        }
                    }
                }
            };

            PullRequests = new ObservableCollection<PullRequest>
            {
                new PullRequest
                {
                    Title = "my pull requets",
                    Body = "the description",
                    UpdatedAt = DateTime.Now,
                    State = "Open",
                    User = user,
                }
            };

            Issues = new ObservableCollection<Issue>
            {
                new Issue
                {
                    Title = "my issue",
                    Body = "the description is very long the description is very long the description is very long the description is very long the description is very long the description is very long the description is very long",
                    UpdatedAt = DateTime.Now,
                    State = "Open",
                    User = user,
                }
            };
        }
コード例 #2
0
ファイル: HomeViewModel.cs プロジェクト: michelsalib/Gi7
 private static void OnRepoSelected(INavigationService navigationService, Repository r)
 {
     if (r != null)
         navigationService.NavigateTo(string.Format(ViewModelLocator.REPOSITORY_URL, r.Owner.Login, r.Name));
 }