コード例 #1
0
 public virtual Response ApplyFromEvaluation(PersonalizerPolicyReferenceOptions body, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("ServiceConfigurationClient.ApplyFromEvaluation");
     scope.Start();
     try
     {
         return(RestClient.ApplyFromEvaluation(body, cancellationToken));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
コード例 #2
0
 /// <summary> Apply Learning Settings and model from a pre-existing Offline Evaluation, making them the current online Learning Settings and model and replacing the previous ones. </summary>
 /// <param name="body"> The PolicyReferenceContract to use. </param>
 /// <param name="cancellationToken"> The cancellation token to use. </param>
 public virtual async Task <Response> ApplyPersonalizerEvaluationAsync(PersonalizerPolicyReferenceOptions body, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("PersonalizerAdministrationClient.ApplyPersonalizerEvaluation");
     scope.Start();
     try
     {
         return(await ServiceConfigurationRestClient.ApplyFromEvaluationAsync(body, cancellationToken).ConfigureAwait(false));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }