예제 #1
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.INotification.
 /// </param>
 /// <param name='registration'>
 /// Required.
 /// </param>
 public static object PostByRegistration(this INotification operations, NotificationRegistration registration)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((INotification)s).PostByRegistrationAsync(registration);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
예제 #2
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.INotification.
 /// </param>
 /// <param name='registration'>
 /// Required.
 /// </param>
 /// <param name='cancellationToken'>
 /// Cancellation token.
 /// </param>
 public static async Task<object> PostByRegistrationAsync(this INotification operations, NotificationRegistration registration, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     Microsoft.Rest.HttpOperationResponse<object> result = await operations.PostByRegistrationWithOperationResponseAsync(registration, cancellationToken).ConfigureAwait(false);
     return result.Body;
 }