public string GetShortHash()
 {
     if (!string.IsNullOrEmpty(Sha) && Sha.Length >= 7)
     {
         return(Sha.Substring(0, 7));
     }
     return("NOTHASH");
 }
Exemplo n.º 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();
        }
Exemplo n.º 3
0
 public CommitSha()
 {
     shortSha = new Lazy <string>(() => Sha.Substring(0, 12));
 }