/// <summary> /// List artifact sources in a given lab. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ArtifactSource> > ListAsync(this IArtifactSourceOperations operations, string resourceGroupName, string labName, ODataQuery <ArtifactSource> odataQuery = default(ODataQuery <ArtifactSource>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List artifact sources in a given lab. /// </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 <ArtifactSource> > ListNextAsync(this IArtifactSourceOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Modify properties of artifact sources. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the artifact source. /// </param> /// <param name='artifactSource'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ArtifactSource> PatchResourceAsync(this IArtifactSourceOperations operations, string resourceGroupName, string labName, string name, ArtifactSource artifactSource, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PatchResourceWithHttpMessagesAsync(resourceGroupName, labName, name, artifactSource, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get artifact source. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the artifact source. /// </param> public static ArtifactSource GetResource(this IArtifactSourceOperations operations, string resourceGroupName, string labName, string name) { return(Task.Factory.StartNew(s => ((IArtifactSourceOperations)s).GetResourceAsync(resourceGroupName, labName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// List artifact sources in a given lab. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <ArtifactSource> List(this IArtifactSourceOperations operations, string resourceGroupName, string labName, ODataQuery <ArtifactSource> odataQuery = default(ODataQuery <ArtifactSource>)) { return(Task.Factory.StartNew(s => ((IArtifactSourceOperations)s).ListAsync(resourceGroupName, labName, odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// List artifact sources in a given lab. /// </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 <ArtifactSource> ListNext(this IArtifactSourceOperations operations, string nextPageLink) { return(Task.Factory.StartNew(s => ((IArtifactSourceOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Delete artifact source. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the artifact source. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteResourceAsync(this IArtifactSourceOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken)) { await operations.DeleteResourceWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false); }