public Task PutComplexPrimitiveDateTimeRfc1123() => TestStatus(async(host, pipeline) => { var value = new Datetimerfc1123Wrapper { Field = DateTimeOffset.Parse("Mon, 01 Jan 0001 00:00:00 GMT"), Now = DateTimeOffset.Parse("Mon, 18 May 2015 11:38:00 GMT") }; return(await new PrimitiveClient(ClientDiagnostics, pipeline, host).PutDateTimeRfc1123Async(value)); });
public virtual Response PutDateTimeRfc1123(Datetimerfc1123Wrapper complexBody, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PrimitiveClient.PutDateTimeRfc1123"); scope.Start(); try { return(RestClient.PutDateTimeRfc1123(complexBody, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response> PutDateTimeRfc1123Async(Datetimerfc1123Wrapper complexBody, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PrimitiveClient.PutDateTimeRfc1123"); scope.Start(); try { return(await RestClient.PutDateTimeRfc1123Async(complexBody, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }
/// <summary> /// Put complex types with datetimeRfc1123 properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 /// GMT' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutDateTimeRfc1123Async(this IPrimitive operations, Datetimerfc1123Wrapper complexBody, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PutDateTimeRfc1123WithHttpMessagesAsync(complexBody, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Put complex types with datetimeRfc1123 properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 /// GMT' /// </param> public static void PutDateTimeRfc1123(this IPrimitive operations, Datetimerfc1123Wrapper complexBody) { operations.PutDateTimeRfc1123Async(complexBody).GetAwaiter().GetResult(); }
/// <summary> /// Put complex types with datetimeRfc1123 properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 /// GMT' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task PutDateTimeRfc1123Async(this IPrimitiveOperations operations, Datetimerfc1123Wrapper complexBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await operations.PutDateTimeRfc1123WithHttpMessagesAsync(complexBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Put complex types with datetimeRfc1123 properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 /// GMT' /// </param> public static void PutDateTimeRfc1123(this IPrimitiveOperations operations, Datetimerfc1123Wrapper complexBody) { System.Threading.Tasks.Task.Factory.StartNew(s => ((IPrimitiveOperations)s).PutDateTimeRfc1123Async(complexBody), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Put complex types with datetimeRfc1123 properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 /// GMT' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutDateTimeRfc1123Async(this IPrimitiveOperations operations, Datetimerfc1123Wrapper complexBody, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PutDateTimeRfc1123WithHttpMessagesAsync(complexBody, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Put complex types with datetimeRfc1123 properties /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='complexBody'> /// Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 /// GMT' /// </param> public static void PutDateTimeRfc1123(this IPrimitiveOperations operations, Datetimerfc1123Wrapper complexBody) { Task.Factory.StartNew(s => ((IPrimitiveOperations)s).PutDateTimeRfc1123Async(complexBody), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }