/// <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 <object> GetByIDAsync(this ISlakkenService operations, long id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetByIDWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <Slak> > GetAllAsync(this ISlakkenService operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='value'> /// </param> public static void Update(this ISlakkenService operations, int id, string value = default(string)) { Task.Factory.StartNew(s => ((ISlakkenService)s).UpdateAsync(id, value), 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> public static object GetByID(this ISlakkenService operations, long id) { return(Task.Factory.StartNew(s => ((ISlakkenService)s).GetByIDAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='value'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task InsertAsync(this ISlakkenService operations, Slak value = default(Slak), CancellationToken cancellationToken = default(CancellationToken)) { await operations.InsertWithHttpMessagesAsync(value, null, cancellationToken).ConfigureAwait(false); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='value'> /// </param> public static void Insert(this ISlakkenService operations, Slak value = default(Slak)) { Task.Factory.StartNew(s => ((ISlakkenService)s).InsertAsync(value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <Slak> GetAll(this ISlakkenService operations) { return(Task.Factory.StartNew(s => ((ISlakkenService)s).GetAllAsync(), 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='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ISlakkenService operations, int id, CancellationToken cancellationToken = default(CancellationToken)) { await operations.DeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='value'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateAsync(this ISlakkenService operations, int id, string value = default(string), CancellationToken cancellationToken = default(CancellationToken)) { await operations.UpdateWithHttpMessagesAsync(id, value, null, cancellationToken).ConfigureAwait(false); }