Example #1
0
 /// <summary>
 /// Gets the notification registration details.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='providerNamespace'>
 /// The name of the resource provider hosted within ProviderHub.
 /// </param>
 /// <param name='notificationRegistrationName'>
 /// The notification registration.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NotificationRegistration> GetAsync(this INotificationRegistrationsOperations operations, string providerNamespace, string notificationRegistrationName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(providerNamespace, notificationRegistrationName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// Creates or updates a notification registration.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='providerNamespace'>
 /// The name of the resource provider hosted within ProviderHub.
 /// </param>
 /// <param name='notificationRegistrationName'>
 /// The notification registration.
 /// </param>
 /// <param name='properties'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NotificationRegistration> CreateOrUpdateAsync(this INotificationRegistrationsOperations operations, string providerNamespace, string notificationRegistrationName, NotificationRegistrationPropertiesModel properties = default(NotificationRegistrationPropertiesModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(providerNamespace, notificationRegistrationName, properties, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #3
0
 /// <summary>
 /// Creates or updates a notification registration.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='providerNamespace'>
 /// The name of the resource provider hosted within ProviderHub.
 /// </param>
 /// <param name='notificationRegistrationName'>
 /// The notification registration.
 /// </param>
 /// <param name='properties'>
 /// </param>
 public static NotificationRegistration CreateOrUpdate(this INotificationRegistrationsOperations operations, string providerNamespace, string notificationRegistrationName, NotificationRegistrationPropertiesModel properties = default(NotificationRegistrationPropertiesModel))
 {
     return(operations.CreateOrUpdateAsync(providerNamespace, notificationRegistrationName, properties).GetAwaiter().GetResult());
 }
Example #4
0
 /// <summary>
 /// Gets the notification registration details.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='providerNamespace'>
 /// The name of the resource provider hosted within ProviderHub.
 /// </param>
 /// <param name='notificationRegistrationName'>
 /// The notification registration.
 /// </param>
 public static NotificationRegistration Get(this INotificationRegistrationsOperations operations, string providerNamespace, string notificationRegistrationName)
 {
     return(operations.GetAsync(providerNamespace, notificationRegistrationName).GetAwaiter().GetResult());
 }
Example #5
0
 /// <summary>
 /// Gets the list of the notification registrations for the given provider.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <NotificationRegistration> > ListByProviderRegistrationNextAsync(this INotificationRegistrationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByProviderRegistrationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #6
0
 /// <summary>
 /// Gets the list of the notification registrations for the given provider.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <NotificationRegistration> ListByProviderRegistrationNext(this INotificationRegistrationsOperations operations, string nextPageLink)
 {
     return(operations.ListByProviderRegistrationNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Example #7
0
 /// <summary>
 /// Gets the list of the notification registrations for the given provider.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='providerNamespace'>
 /// The name of the resource provider hosted within ProviderHub.
 /// </param>
 public static IPage <NotificationRegistration> ListByProviderRegistration(this INotificationRegistrationsOperations operations, string providerNamespace)
 {
     return(operations.ListByProviderRegistrationAsync(providerNamespace).GetAwaiter().GetResult());
 }
Example #8
0
 /// <summary>
 /// Deletes a notification registration.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='providerNamespace'>
 /// The name of the resource provider hosted within ProviderHub.
 /// </param>
 /// <param name='notificationRegistrationName'>
 /// The notification registration.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this INotificationRegistrationsOperations operations, string providerNamespace, string notificationRegistrationName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(providerNamespace, notificationRegistrationName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #9
0
 /// <summary>
 /// Deletes a notification registration.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='providerNamespace'>
 /// The name of the resource provider hosted within ProviderHub.
 /// </param>
 /// <param name='notificationRegistrationName'>
 /// The notification registration.
 /// </param>
 public static void Delete(this INotificationRegistrationsOperations operations, string providerNamespace, string notificationRegistrationName)
 {
     operations.DeleteAsync(providerNamespace, notificationRegistrationName).GetAwaiter().GetResult();
 }