/// <summary> /// Registrate service to Kong /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='serviceUpsert'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Service> AddServiceAsync(this IKongAdminAPI operations, ServiceUpsert serviceUpsert, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddServiceWithHttpMessagesAsync(serviceUpsert, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Registrate service to Kong /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='serviceUpsert'> /// </param> public static Service AddService(this IKongAdminAPI operations, ServiceUpsert serviceUpsert) { return(operations.AddServiceAsync(serviceUpsert).GetAwaiter().GetResult()); }