public async virtual Task <Response <VirtualApplication> > UpdateAsync(VirtualApplicationUpdateOptions options = null, CancellationToken cancellationToken = default) { using var scope = _virtualApplicationApplicationsClientDiagnostics.CreateScope("VirtualApplication.Update"); scope.Start(); try { var response = await _virtualApplicationApplicationsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, options, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new VirtualApplication(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response <VirtualApplicationResource> > UpdateAsync(PatchableVirtualApplicationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _virtualApplicationApplicationsClientDiagnostics.CreateScope("VirtualApplicationResource.Update"); scope.Start(); try { var response = await _virtualApplicationApplicationsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); return(Response.FromValue(new VirtualApplicationResource(Client, response.Value), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }