/// <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 <EventModel> ApiEventsByIdGetAsync(this IEventStoreAPI operations, string id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiEventsByIdGetWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static void ApiEventsByIdDelete(this IEventStoreAPI operations, int id) { operations.ApiEventsByIdDeleteAsync(id).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static EventModel ApiEventsByIdGet(this IEventStoreAPI operations, string id) { return(operations.ApiEventsByIdGetAsync(id).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='eventParameter'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ApiEventsPostAsync(this IEventStoreAPI operations, EventModel eventParameter = default(EventModel), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ApiEventsPostWithHttpMessagesAsync(eventParameter, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='eventParameter'> /// </param> public static void ApiEventsPost(this IEventStoreAPI operations, EventModel eventParameter = default(EventModel)) { operations.ApiEventsPostAsync(eventParameter).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <EventModel> ApiEventsGet(this IEventStoreAPI operations) { return(operations.ApiEventsGetAsync().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 ApiEventsByIdDeleteAsync(this IEventStoreAPI operations, int id, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ApiEventsByIdDeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)).Dispose(); }