Пример #1
0
        public Task PutEmptyWrappedXMLList() => TestStatus(async(host, pipeline) =>
        {
            var root = new AppleBarrel()
            {
                BadApples  = new string[] {},
                GoodApples = new string[] {}
            };

            return(await new XmlClient(ClientDiagnostics, pipeline, host).PutEmptyWrappedListsAsync(root));
        });
Пример #2
0
        public Task PutWrappedXMLList() => TestStatus(async(host, pipeline) =>
        {
            var root = new AppleBarrel()
            {
                BadApples  = new[] { "Red Delicious" },
                GoodApples = new[] { "Fuji", "Gala" }
            };

            return(await new XmlClient(ClientDiagnostics, pipeline, host).PutWrappedListsAsync(root));
        });
Пример #3
0
 public virtual Response PutEmptyWrappedLists(AppleBarrel appleBarrel, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("XmlClient.PutEmptyWrappedLists");
     scope.Start();
     try
     {
         return(RestClient.PutEmptyWrappedLists(appleBarrel, cancellationToken));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
Пример #4
0
 public virtual async Task <Response> PutEmptyWrappedListsAsync(AppleBarrel appleBarrel, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("XmlClient.PutEmptyWrappedLists");
     scope.Start();
     try
     {
         return(await RestClient.PutEmptyWrappedListsAsync(appleBarrel, cancellationToken).ConfigureAwait(false));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }