Exemplo n.º 1
0
 public int ComputeNumberOfDocs(BucketStats stats)
 {
     if (stats == null)
     {
         throw new ArgumentNullException(nameof(stats));
     }
     return(stats.basicStats.itemCount);
 }
Exemplo n.º 2
0
        public Task <ICheckResult> RunAsync()
        {
            HttpClient httpClient = client.WithBasicAuthorization();

            BucketStats stats = ComputeCouchBaseBucketStats(httpClient);

            var numberOfDocs = ComputeNumberOfDocs(stats);

            var level = CheckNumberOfDocs(numberOfDocs);

            return(Task.FromResult <ICheckResult>(new CheckResult(ShortName, level)));
        }