Exemplo n.º 1
0
 /// <summary>
 /// Creates or updates the provider 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='properties'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProviderRegistration> CreateOrUpdateAsync(this IProviderRegistrationsOperations operations, string providerNamespace, ProviderRegistrationPropertiesModel properties = default(ProviderRegistrationPropertiesModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(providerNamespace, properties, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the provider 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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ProviderRegistration> GetAsync(this IProviderRegistrationsOperations operations, string providerNamespace, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(providerNamespace, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the list of the provider registrations in the subscription.
 /// </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 <ProviderRegistration> > ListNextAsync(this IProviderRegistrationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates or updates the provider 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='properties'>
 /// </param>
 public static ProviderRegistration CreateOrUpdate(this IProviderRegistrationsOperations operations, string providerNamespace, ProviderRegistrationPropertiesModel properties = default(ProviderRegistrationPropertiesModel))
 {
     return(operations.CreateOrUpdateAsync(providerNamespace, properties).GetAwaiter().GetResult());
 }
Exemplo n.º 5
0
 /// <summary>
 /// Gets the provider 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>
 public static ProviderRegistration Get(this IProviderRegistrationsOperations operations, string providerNamespace)
 {
     return(operations.GetAsync(providerNamespace).GetAwaiter().GetResult());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Gets the list of the provider registrations in the subscription.
 /// </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 <ProviderRegistration> ListNext(this IProviderRegistrationsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemplo n.º 7
0
 /// <summary>
 /// Generates the operations api 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 IList <OperationsDefinition> GenerateOperations(this IProviderRegistrationsOperations operations, string providerNamespace)
 {
     return(operations.GenerateOperationsAsync(providerNamespace).GetAwaiter().GetResult());
 }
Exemplo n.º 8
0
 /// <summary>
 /// Gets the list of the provider registrations in the subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <ProviderRegistration> List(this IProviderRegistrationsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
Exemplo n.º 9
0
 /// <summary>
 /// Deletes a provider 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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IProviderRegistrationsOperations operations, string providerNamespace, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(providerNamespace, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 10
0
 /// <summary>
 /// Deletes a provider 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>
 public static void Delete(this IProviderRegistrationsOperations operations, string providerNamespace)
 {
     operations.DeleteAsync(providerNamespace).GetAwaiter().GetResult();
 }