/// <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); } }
/// <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); } }
/// <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()); }
/// <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()); }
/// <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); } }
/// <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()); }
/// <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()); }
/// <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(); }
/// <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(); }