/// <summary> /// Create Evaluation. /// </summary> /// <remarks> /// Submit a new evaluation job. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='evaluation'> /// The evaluation job definition. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Evaluation> CreateAsync(this IEvaluations operations, EvaluationContract evaluation, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(evaluation, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create Evaluation. /// </summary> /// <remarks> /// Submit a new evaluation job. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='evaluation'> /// The evaluation job definition. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <Evaluation, EvaluationsCreateHeaders> CreateWithHttpMessages(this IEvaluations operations, EvaluationContract evaluation, Dictionary <string, List <string> > customHeaders = null) { return(operations.CreateWithHttpMessagesAsync(evaluation, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }