Exemplo n.º 1
0
        private Element CreateElement(Octokit.Branch branch)
        {
            var e = new StringElement(branch.Name);

            e.Clicked.Subscribe(_ => _branchSubject.OnNext(branch));
            return(e);
        }
Exemplo n.º 2
0
        public BranchModel(Octokit.Branch branch, IRepositoryModel repo)
        {
            Extensions.Guard.ArgumentNotNull(branch, nameof(branch));
            Extensions.Guard.ArgumentNotNull(repo, nameof(repo));

            Name       = DisplayName = branch.Name;
            Repository = repo;
            Id         = String.Format(CultureInfo.InvariantCulture, "{0}/{1}", Repository.Owner, Name);
        }
        public BranchCell(Octokit.Branch branch)
        {
            Branch = branch;

            Text = branch.Name;
            Normalize();

            Command = new Command((obj) =>
            {
                if (!IsEnabled)
                {
                    return;
                }

                if (Click != null)
                {
                    Click(this, EventArgs.Empty);
                }
            });
        }
 public static BranchCell FromBranch(Octokit.Branch branch)
 {
     return(new BranchCell(branch));
 }