public virtual Response PostOptionalStringProperty(StringOptionalWrapper bodyParameter = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("ExplicitClient.PostOptionalStringProperty"); scope.Start(); try { return(RestClient.PostOptionalStringProperty(bodyParameter, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response> PostOptionalStringPropertyAsync(StringOptionalWrapper bodyParameter = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("ExplicitClient.PostOptionalStringProperty"); scope.Start(); try { return(await RestClient.PostOptionalStringPropertyAsync(bodyParameter, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }
/// <summary> /// Test explicitly optional integer. Please put a valid string-wrapper with /// 'value' = null. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='bodyParameter'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PostOptionalStringPropertyAsync(this IExplicitModel operations, StringOptionalWrapper bodyParameter = default(StringOptionalWrapper), CancellationToken cancellationToken = default(CancellationToken)) { await operations.PostOptionalStringPropertyWithHttpMessagesAsync(bodyParameter, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Test explicitly optional integer. Please put a valid string-wrapper with /// 'value' = null. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='bodyParameter'> /// </param> public static void PostOptionalStringProperty(this IExplicitModel operations, StringOptionalWrapper bodyParameter = default(StringOptionalWrapper)) { Task.Factory.StartNew(s => ((IExplicitModel)s).PostOptionalStringPropertyAsync(bodyParameter), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Test explicitly optional integer. Please put a valid string-wrapper with /// 'value' = null. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='bodyParameter'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PostOptionalStringPropertyAsync( this IExplicitModel operations, StringOptionalWrapper bodyParameter = default(StringOptionalWrapper), CancellationToken cancellationToken = default(CancellationToken)) { await operations.PostOptionalStringPropertyWithHttpMessagesAsync(bodyParameter, null, cancellationToken).ConfigureAwait(false); }