示例#1
0
 /// <summary>
 /// Create a new table instance or update an existing instance with raw
 /// json content.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.ITableOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='tableName'>
 /// Required. A unique table instance name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a table.
 /// </param>
 /// <returns>
 /// The CreateOrUpdate table operation response.
 /// </returns>
 public static Task <TableCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(
     this ITableOperations operations,
     string resourceGroupName,
     string dataFactoryName,
     string tableName,
     TableCreateOrUpdateWithRawJsonContentParameters parameters)
 {
     return(operations.CreateOrUpdateWithRawJsonContentAsync(
                resourceGroupName,
                dataFactoryName,
                tableName,
                parameters,
                CancellationToken.None));
 }
示例#2
0
 /// <summary>
 /// Create a new table instance or update an existing instance with raw
 /// json content.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.ITableOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='tableName'>
 /// Required. A unique table instance name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a table.
 /// </param>
 /// <returns>
 /// The CreateOrUpdate table operation response.
 /// </returns>
 public static TableCreateOrUpdateResponse CreateOrUpdateWithRawJsonContent(
     this ITableOperations operations,
     string resourceGroupName,
     string dataFactoryName,
     string tableName,
     TableCreateOrUpdateWithRawJsonContentParameters parameters)
 {
     return(Task.Factory.StartNew(
                s => ((ITableOperations)s).CreateOrUpdateWithRawJsonContentAsync(
                    resourceGroupName,
                    dataFactoryName,
                    tableName,
                    parameters),
                operations,
                CancellationToken.None,
                TaskCreationOptions.None,
                TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
        public async Task <TableCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(
            string resourceGroupName,
            string dataFactoryName,
            string tableName,
            TableCreateOrUpdateWithRawJsonContentParameters parameters,
            CancellationToken cancellationToken)
        {
            var internalParameters = new Core.Models.TableCreateOrUpdateWithRawJsonContentParameters(parameters.Content);

            Core.Models.TableCreateOrUpdateResponse response =
                await this.Client.InternalClient.Tables.CreateOrUpdateWithRawJsonContentAsync(
                    resourceGroupName,
                    dataFactoryName,
                    tableName,
                    internalParameters,
                    cancellationToken);

            return(new TableCreateOrUpdateResponse(response, this.Client));
        }