public virtual async Task <Response <TemplateHashResult> > CalculateTemplateHashAsync(object template, CancellationToken cancellationToken = default) { if (template == null) { throw new ArgumentNullException(nameof(template)); } using var scope = _clientDiagnostics.CreateScope("DeploymentExtended.CalculateTemplateHash"); scope.Start(); try { var response = await _restClient.CalculateTemplateHashAsync(template, cancellationToken).ConfigureAwait(false); return(response); } catch (Exception e) { scope.Failed(e); throw; } }