示例#1
0
 private async Task Save()
 {
     using (var repo = new PactRepo(_configuration))
     {
         await repo.Put(this);
     }
 }
示例#2
0
        private async Task PublishIfSuccessful()
        {
            if (_configuration == null)
            {
                return;
            }
            if (_failures.Any())
            {
                _configuration.LogSafe(LogLevel.Error, $"There are {_failures.Count} failing pacts. Publishing is omitted.");
            }
            var repo = new PactRepo(_configuration);

            foreach (var pact in new PactGrouper(_successful))
            {
                await repo.Put(pact);
            }
        }