/// <summary> /// Create a new hub instance or update an existing instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.DataFactories.IHubOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the data factory. /// </param> /// <param name='dataFactoryName'> /// Required. The name of the data factory. /// </param> /// <param name='hubName'> /// Required. The name of the data factory hub to be created or updated. /// </param> /// <param name='parameters'> /// Required. The parameters required to create or update a hub. /// </param> /// <returns> /// The create or update hub operation response. /// </returns> public static HubCreateOrUpdateResponse CreateOrUpdateWithRawJsonContent(this IHubOperations operations, string resourceGroupName, string dataFactoryName, string hubName, HubCreateOrUpdateWithRawJsonContentParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IHubOperations)s).CreateOrUpdateWithRawJsonContentAsync(resourceGroupName, dataFactoryName, hubName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Create a new hub instance or update an existing instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.DataFactories.IHubOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The resource group name of the data factory. /// </param> /// <param name='dataFactoryName'> /// Required. The name of the data factory. /// </param> /// <param name='hubName'> /// Required. The name of the data factory hub to be created or updated. /// </param> /// <param name='parameters'> /// Required. The parameters required to create or update a hub. /// </param> /// <returns> /// The create or update hub operation response. /// </returns> public static Task <HubCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(this IHubOperations operations, string resourceGroupName, string dataFactoryName, string hubName, HubCreateOrUpdateWithRawJsonContentParameters parameters) { return(operations.CreateOrUpdateWithRawJsonContentAsync(resourceGroupName, dataFactoryName, hubName, parameters, CancellationToken.None)); }
public async Task <HubCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(string resourceGroupName, string dataFactoryName, string hubName, HubCreateOrUpdateWithRawJsonContentParameters parameters, CancellationToken cancellationToken) { return(await this.Client.InternalClient.Hubs.CreateOrUpdateWithRawJsonContentAsync(resourceGroupName, dataFactoryName, hubName, parameters, cancellationToken)); }