/// <summary> /// adds a record type to the system /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='value'> /// new record to add /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <string> ApiValuesPostAsync(this IWebApitemplate operations, Record value = default(Record), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ApiValuesPostWithHttpMessagesAsync(value, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// returns a specific value with the specified id /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// id of value to return /// </param> public static string ApiValuesByIdGet(this IWebApitemplate operations, int id) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IWebApitemplate)s).ApiValuesByIdGetAsync(id), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// returns a collection of values /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static System.Collections.Generic.IList <string> ApiValuesGet(this IWebApitemplate operations) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IWebApitemplate)s).ApiValuesGetAsync(), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// returns a collection of values /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <System.Collections.Generic.IList <string> > ApiValuesGetAsync(this IWebApitemplate operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ApiValuesGetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// removes a record from the system /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// id of resource to remove /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> ApiValuesByIdDeleteAsync(this IWebApitemplate operations, int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ApiValuesByIdDeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }