コード例 #1
0
        public static async Task <TravisPublicKeyService> Create(TravisType travisType, HttpClient client)
        {
            var obj = new TravisPublicKeyService(travisType, client);
            await obj.FetchPublicKey();

            return(obj);
        }
コード例 #2
0
 public TravisMessageModel(string message, string signature, IMemoryCache cache, Encoding encoding, HttpClient client)
 {
     digestedMessage = Sha1.DigestMessage(message, encoding);
     type            = GetTravisType(message);
     this.signature  = Convert.FromBase64String(signature);
     this.cache      = cache;
     this.client     = client;
 }
コード例 #3
0
 private TravisPublicKeyService(TravisType type, HttpClient client)
 {
     this.type   = type;
     this.client = client;
 }
コード例 #4
0
 public void ReturnCorrectType(string buildurl, TravisType expected)
 {
     Assert.Equal(TravisMessageModel.GetTravisType(buildurl), expected);
 }