示例#1
0
 /// <summary>
 /// List artifacts in a given 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='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Artifact> > ListAsync(this IArtifactOperations operations, string resourceGroupName, string labName, string artifactSourceName, ODataQuery <Artifact> odataQuery = default(ODataQuery <Artifact>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// List artifacts in a given artifact source.
 /// </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 <Artifact> > ListNextAsync(this IArtifactOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Generates an ARM template for the given artifact, uploads the required
 /// files to a storage account, and validates the generated artifact.
 /// </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='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='name'>
 /// The name of the artifact.
 /// </param>
 /// <param name='generateArmTemplateRequest'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ArmTemplateInfo> GenerateArmTemplateAsync(this IArtifactOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name, GenerateArmTemplateRequest generateArmTemplateRequest, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GenerateArmTemplateWithHttpMessagesAsync(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <summary>
 /// Get artifact.
 /// </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='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='name'>
 /// The name of the artifact.
 /// </param>
 public static Artifact GetResource(this IArtifactOperations operations, string resourceGroupName, string labName, string artifactSourceName, string name)
 {
     return(Task.Factory.StartNew(s => ((IArtifactOperations)s).GetResourceAsync(resourceGroupName, labName, artifactSourceName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#5
0
 /// <summary>
 /// List artifacts in a given 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='artifactSourceName'>
 /// The name of the artifact source.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <Artifact> List(this IArtifactOperations operations, string resourceGroupName, string labName, string artifactSourceName, ODataQuery <Artifact> odataQuery = default(ODataQuery <Artifact>))
 {
     return(Task.Factory.StartNew(s => ((IArtifactOperations)s).ListAsync(resourceGroupName, labName, artifactSourceName, odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#6
0
 /// <summary>
 /// List artifacts in a given artifact source.
 /// </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 <Artifact> ListNext(this IArtifactOperations operations, string nextPageLink)
 {
     return(Task.Factory.StartNew(s => ((IArtifactOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }