/// <summary> /// Gets an OAuth authorization session. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.DataFactories.Core.IOAuthOperations. /// </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='linkedServiceType'> /// Required. The type of OAuth linked service. /// </param> /// <returns> /// The Get authorization session operation response. /// </returns> public static AuthorizationSessionGetResponse Get(this IOAuthOperations operations, string resourceGroupName, string dataFactoryName, string linkedServiceType) { return(Task.Factory.StartNew((object s) => { return ((IOAuthOperations)s).GetAsync(resourceGroupName, dataFactoryName, linkedServiceType); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the DataFactoryManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public DataFactoryManagementClient(HttpClient httpClient) : base(httpClient) { this._activityTypes = new ActivityTypeOperations(this); this._computeTypes = new ComputeTypeOperations(this); this._dataFactories = new DataFactoryOperations(this); this._datasets = new DatasetOperations(this); this._dataSlices = new DataSliceOperations(this); this._dataSliceRuns = new DataSliceRunOperations(this); this._gateways = new GatewayOperations(this); this._hubs = new HubOperations(this); this._linkedServices = new LinkedServiceOperations(this); this._oAuth = new OAuthOperations(this); this._pipelines = new PipelineOperations(this); this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(60); }
/// <summary> /// Gets an OAuth authorization session. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.DataFactories.Core.IOAuthOperations. /// </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='linkedServiceType'> /// Required. The type of OAuth linked service. /// </param> /// <returns> /// The Get authorization session operation response. /// </returns> public static Task <AuthorizationSessionGetResponse> GetAsync(this IOAuthOperations operations, string resourceGroupName, string dataFactoryName, string linkedServiceType) { return(operations.GetAsync(resourceGroupName, dataFactoryName, linkedServiceType, CancellationToken.None)); }