public string GetShortHash()
 {
     if (!string.IsNullOrEmpty(Sha) && Sha.Length >= 7)
     {
         return(Sha.Substring(0, 7));
     }
     return("NOTHASH");
 }
Exemple #2
0
        protected void SetUp()
        {
            const string Sha = "2DEA9A198FDCF0FE70473C079F1036B6E16FBFCE";

            _checksum = Enumerable.Range(0, Sha.Length)
                        .Where(x => x % 2 == 0)
                        .Select(x => Convert.ToByte(Sha.Substring(x, 2), 16))
                        .ToArray();
        }
Exemple #3
0
 public CommitSha()
 {
     shortSha = new Lazy <string>(() => Sha.Substring(0, 12));
 }