Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SimpleEntry" /> struct.
 /// </summary>
 /// <param name="repo">The repo.</param>
 /// <param name="entry">The tree entry.</param>
 /// <exception cref="System.ArgumentNullException">
 /// repo
 /// or
 /// entry
 /// </exception>
 internal SimpleEntry(Repository repo, TreeEntry entry)
     : this()
 {
     if (repo == null)
     {
         throw new ArgumentNullException("repo");
     }
     if (entry == null)
     {
         throw new ArgumentNullException("entry");
     }
     this.repo  = repo;
     this.entry = entry;
     target     = entry.Target;
     this.blob  = entry.Target as Blob;
     this.link  = entry.Target as GitLink;
 }
Exemple #2
0
 public string GetGithubLinkOf(string path)
 {
     return($"https://raw.githubusercontent.com/{GitLink.Substring("https://github.com/".Length)}/{GitRef}/{path}");
 }
 public void AddOrSet(string key, GitLink gitLinkTo)
 {
     AddOrSetImpl(key, gitLinkTo);
 }
 private static void CopyLink(TreeDefinition definition, string name, GitLink link)
 {
     definition.AddGitLink(name, link.Id);
 }