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