예제 #1
0
 /// <summary>
 /// Creates/Update a NotificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create/update a NotificationHub Resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NotificationHubResourceInner> CreateOrUpdateAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, NotificationHubCreateOrUpdateParametersInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, notificationHubName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// test send a push notification
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='parameters'>
 /// Debug send parameters
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DebugSendResponse> DebugSendAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, object parameters = default(object), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DebugSendWithHttpMessagesAsync(resourceGroupName, namespaceName, notificationHubName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #3
0
 /// <summary>
 /// Lists the notification hubs associated with a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <NotificationHubResourceInner> > ListAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, namespaceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #4
0
 /// <summary>
 /// Checks the availability of the given notificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// The notificationHub name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckAvailabilityResource> CheckAvailabilityAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckAvailabilityWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Regenerates the Primary/Secondary Keys to the NotificationHub Authorization
 /// Rule
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The connection string of the NotificationHub for the specified
 /// authorizationRule.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to regenerate the NotificationHub Authorization Rule
 /// Key.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ResourceListKeys> RegenerateKeysAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, string authorizationRuleName, PolicykeyResource parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RegenerateKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the PNS Credentials associated with a notification hub .
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PnsCredentialsResource> GetPnsCredentialsAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetPnsCredentialsWithHttpMessagesAsync(resourceGroupName, namespaceName, notificationHubName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Patch a NotificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to patch a NotificationHub Resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NotificationHubResource> PatchAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, NotificationHubPatchParameters parameters = default(NotificationHubPatchParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PatchWithHttpMessagesAsync(resourceGroupName, namespaceName, notificationHubName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists the notification hubs associated with a namespace.
 /// </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 <NotificationHubResource> > ListNextAsync(this INotificationHubsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations       = new Operations(this);
     Namespaces       = new NamespacesOperations(this);
     NotificationHubs = new NotificationHubsOperations(this);
     BaseUri          = new System.Uri("https://management.azure.com");
     ApiVersion       = "2017-04-01";
     AcceptLanguage   = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.Namespaces       = new NamespacesOperations(this);
     this.NotificationHubs = new NotificationHubsOperations(this);
     this.BaseUri          = new Uri("https://management.azure.com");
     this.ApiVersion       = "2014-09-01";
     this.AcceptLanguage   = "en-US";
     this.LongRunningOperationRetryTimeout = 30;
     this.GenerateClientRequestId          = true;
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Formatting.Indented,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
예제 #11
0
 /// <summary>
 /// Lists the PNS Credentials associated with a notification hub .
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 public static NotificationHubResource GetPnsCredentials(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName)
 {
     return(Task.Factory.StartNew(s => ((INotificationHubsOperations)s).GetPnsCredentialsAsync(resourceGroupName, namespaceName, notificationHubName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists the PNS Credentials associated with a notification hub .
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 public static PnsCredentialsResource GetPnsCredentials(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName)
 {
     return(operations.GetPnsCredentialsAsync(resourceGroupName, namespaceName, notificationHubName).GetAwaiter().GetResult());
 }
예제 #13
0
 /// <summary>
 /// Gets the authorization rules for a NotificationHub.
 /// </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 <SharedAccessAuthorizationRuleResource> ListAuthorizationRulesNext(this INotificationHubsOperations operations, string nextPageLink)
 {
     return(Task.Factory.StartNew(s => ((INotificationHubsOperations)s).ListAuthorizationRulesNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Regenerates the Primary/Secondary Keys to the NotificationHub Authorization
 /// Rule
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The connection string of the NotificationHub for the specified
 /// authorizationRule.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to regenerate the NotificationHub Authorization Rule
 /// Key.
 /// </param>
 public static ResourceListKeys RegenerateKeys(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, string authorizationRuleName, PolicykeyResource parameters)
 {
     return(operations.RegenerateKeysAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the Primary and Secondary ConnectionStrings to the NotificationHub
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// The connection string of the NotificationHub for the specified
 /// authorizationRule.
 /// </param>
 public static ResourceListKeys ListKeys(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, string authorizationRuleName)
 {
     return(operations.ListKeysAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the authorization rules for a NotificationHub.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 public static IPage <SharedAccessAuthorizationRuleResource> ListAuthorizationRules(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName)
 {
     return(operations.ListAuthorizationRulesAsync(resourceGroupName, namespaceName, notificationHubName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// test send a push notification
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='parameters'>
 /// Debug send parameters
 /// </param>
 public static DebugSendResponse DebugSend(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, object parameters = default(object))
 {
     return(operations.DebugSendAsync(resourceGroupName, namespaceName, notificationHubName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets an authorization rule for a NotificationHub by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// authorization rule name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SharedAccessAuthorizationRuleResource> GetAuthorizationRuleAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #19
0
 /// <summary>
 /// Gets the authorization rules for a NotificationHub.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 public static IPage <SharedAccessAuthorizationRuleResource> ListAuthorizationRules(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName)
 {
     return(Task.Factory.StartNew(s => ((INotificationHubsOperations)s).ListAuthorizationRulesAsync(resourceGroupName, namespaceName, notificationHubName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the authorization rules for a NotificationHub.
 /// </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 <SharedAccessAuthorizationRuleResource> ListAuthorizationRulesNext(this INotificationHubsOperations operations, string nextPageLink)
 {
     return(operations.ListAuthorizationRulesNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates/Updates an authorization rule for a NotificationHub
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// Authorization Rule Name.
 /// </param>
 /// <param name='parameters'>
 /// The shared access authorization rule.
 /// </param>
 public static SharedAccessAuthorizationRuleResource CreateOrUpdateAuthorizationRule(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, string authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters).GetAwaiter().GetResult());
 }
예제 #22
0
 /// <summary>
 /// Creates/Update a NotificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create/update a NotificationHub Resource.
 /// </param>
 public static NotificationHubResource CreateOrUpdate(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, NotificationHubCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew(s => ((INotificationHubsOperations)s).CreateOrUpdateAsync(resourceGroupName, namespaceName, notificationHubName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists the notification hubs associated with a namespace.
 /// </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 <NotificationHubResource> ListNext(this INotificationHubsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists the notification hubs associated with a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 public static IPage <NotificationHubResource> List(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName)
 {
     return(operations.ListAsync(resourceGroupName, namespaceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Checks the availability of the given notificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// The notificationHub name.
 /// </param>
 public static CheckAvailabilityResult CheckNotificationHubAvailability(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
 {
     return(operations.CheckNotificationHubAvailabilityAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Patch a NotificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to patch a NotificationHub Resource.
 /// </param>
 public static NotificationHubResource Patch(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, NotificationHubPatchParameters parameters = default(NotificationHubPatchParameters))
 {
     return(operations.PatchAsync(resourceGroupName, namespaceName, notificationHubName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates/Update a NotificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create/update a NotificationHub Resource.
 /// </param>
 public static NotificationHubResource CreateOrUpdate(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, NotificationHubCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, namespaceName, notificationHubName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a notificationHub authorization rule
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// Authorization Rule Name.
 /// </param>
 public static void DeleteAuthorizationRule(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, string authorizationRuleName)
 {
     operations.DeleteAuthorizationRuleAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Deletes a notificationHub authorization rule
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='notificationHubName'>
 /// The notification hub name.
 /// </param>
 /// <param name='authorizationRuleName'>
 /// Authorization Rule Name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAuthorizationRuleAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, string notificationHubName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteAuthorizationRuleWithHttpMessagesAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #30
0
 /// <summary>
 /// Checks the availability of the given notificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// The notificationHub name.
 /// </param>
 public static CheckAvailabilityResource CheckAvailability(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
 {
     return(Task.Factory.StartNew(s => ((INotificationHubsOperations)s).CheckAvailabilityAsync(resourceGroupName, namespaceName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }