Beispiel #1
0
 /// <summary>
 /// Extract entities from string
 /// </summary>
 /// Extract the named entitites from an input string.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='value'>
 /// Input string
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PostOKResponse> PostAsync(this IExtractEntitiesString operations, string value, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PostWithHttpMessagesAsync(value, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Extract entities from string
 /// </summary>
 /// Extract the named entitites from an input string.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='value'>
 /// Input string
 /// </param>
 public static PostOKResponse Post(this IExtractEntitiesString operations, string value)
 {
     return(Task.Factory.StartNew(s => ((IExtractEntitiesString)s).PostAsync(value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }