/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Hall> GetHallByIdAsync(this IHalls operations, int id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetHallByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hall'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Hall> PostHallAsync(this IHalls operations, Hall hall, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostHallWithHttpMessagesAsync(hall, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static Hall GetHallById(this IHalls operations, int id) { return(Task.Factory.StartNew(s => ((IHalls)s).GetHallByIdAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='hall'> /// </param> public static Hall PostHall(this IHalls operations, Hall hall) { return(Task.Factory.StartNew(s => ((IHalls)s).PostHallAsync(hall), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='hall'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutHallAsync(this IHalls operations, int id, Hall hall, CancellationToken cancellationToken = default(CancellationToken)) { await operations.PutHallWithHttpMessagesAsync(id, hall, null, cancellationToken).ConfigureAwait(false); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='hall'> /// </param> public static void PutHall(this IHalls operations, int id, Hall hall) { Task.Factory.StartNew(s => ((IHalls)s).PutHallAsync(id, hall), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }