public virtual Response <IReadOnlyList <Snapshot> > GetDeletedWebAppSnapshots(CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("DeletedSite.GetDeletedWebAppSnapshots"); scope.Start(); try { var response = _globalRestClient.GetDeletedWebAppSnapshots(Id.SubscriptionId, Id.Name, cancellationToken); return(Response.FromValue(response.Value, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual Pageable <Snapshot> GetDeletedWebAppSnapshots(CancellationToken cancellationToken = default) { Page <Snapshot> FirstPageFunc(int?pageSizeHint) { using var scope = _deletedSiteGlobalClientDiagnostics.CreateScope("DeletedSite.GetDeletedWebAppSnapshots"); scope.Start(); try { var response = _deletedSiteGlobalRestClient.GetDeletedWebAppSnapshots(Id.SubscriptionId, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value, null, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, null)); }