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)); });
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)); });
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; } }
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; } }