コード例 #1
0
        public async Task <LinkedServiceCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(
            string resourceGroupName,
            string dataFactoryName,
            string linkedServiceName,
            LinkedServiceCreateOrUpdateWithRawJsonContentParameters parameters,
            CancellationToken cancellationToken)
        {
            var internalParameters =
                new Core.Models.LinkedServiceCreateOrUpdateWithRawJsonContentParameters(parameters.Content);

            Core.Models.LinkedServiceCreateOrUpdateResponse response =
                await this.Client.InternalClient.LinkedServices.CreateOrUpdateWithRawJsonContentAsync(
                    resourceGroupName,
                    dataFactoryName,
                    linkedServiceName,
                    internalParameters,
                    cancellationToken);

            return(new LinkedServiceCreateOrUpdateResponse(response, this.Client));
        }
コード例 #2
0
 /// <summary>
 /// Create or update a data factory linkedService with raw json content.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.Core.ILinkedServiceOperations.
 /// </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='linkedServiceName'>
 /// Required. The name of the data factory linked service to be created
 /// or updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a data
 /// factory linkedService.
 /// </param>
 /// <returns>
 /// The create or update data factory linkedService operation response.
 /// </returns>
 public static Task<LinkedServiceCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(this ILinkedServiceOperations operations, string resourceGroupName, string dataFactoryName, string linkedServiceName, LinkedServiceCreateOrUpdateWithRawJsonContentParameters parameters)
 {
     return operations.CreateOrUpdateWithRawJsonContentAsync(resourceGroupName, dataFactoryName, linkedServiceName, parameters, CancellationToken.None);
 }
コード例 #3
0
 /// <summary>
 /// Create or update a data factory linkedService with raw json content.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.Core.ILinkedServiceOperations.
 /// </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='linkedServiceName'>
 /// Required. The name of the data factory linked service to be created
 /// or updated.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a data
 /// factory linkedService.
 /// </param>
 /// <returns>
 /// The create or update data factory linkedService operation response.
 /// </returns>
 public static LinkedServiceCreateOrUpdateResponse CreateOrUpdateWithRawJsonContent(this ILinkedServiceOperations operations, string resourceGroupName, string dataFactoryName, string linkedServiceName, LinkedServiceCreateOrUpdateWithRawJsonContentParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((ILinkedServiceOperations)s).CreateOrUpdateWithRawJsonContentAsync(resourceGroupName, dataFactoryName, linkedServiceName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }