Beispiel #1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <string> > GetAllAsync(this IContosoDevApiOrchestration operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static void GetById(this IContosoDevApiOrchestration operations, int id)
 {
     Task.Factory.StartNew(s => ((IContosoDevApiOrchestration)s).GetByIdAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Beispiel #3
0
 /// <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 CreateAsync(this IContosoDevApiOrchestration operations, string value, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.CreateWithHttpMessagesAsync(value, null, cancellationToken).ConfigureAwait(false);
 }
Beispiel #4
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='value'>
 /// </param>
 public static void Create(this IContosoDevApiOrchestration operations, string value)
 {
     Task.Factory.StartNew(s => ((IContosoDevApiOrchestration)s).CreateAsync(value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Beispiel #5
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <string> GetAll(this IContosoDevApiOrchestration operations)
 {
     return(Task.Factory.StartNew(s => ((IContosoDevApiOrchestration)s).GetAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Beispiel #6
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenant'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task AcceptedAsync(this IContosoDevApiOrchestration operations, Tenant tenant, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.AcceptedWithHttpMessagesAsync(tenant, null, cancellationToken).ConfigureAwait(false);
 }
Beispiel #7
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenant'>
 /// </param>
 public static void Accepted(this IContosoDevApiOrchestration operations, Tenant tenant)
 {
     Task.Factory.StartNew(s => ((IContosoDevApiOrchestration)s).AcceptedAsync(tenant), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
Beispiel #8
0
 /// <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 IContosoDevApiOrchestration operations, int id, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.DeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false);
 }