コード例 #1
0
 /// <summary>
 /// Update a lab resource.
 /// </summary>
 /// <remarks>
 /// Operation to update a lab resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// The request body.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab that uniquely identifies it within containing lab
 /// account. Used in resource URIs.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Lab> UpdateAsync(this ILabsOperations operations, LabUpdate body, string resourceGroupName, string labName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(body, resourceGroupName, labName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
        public void UpdateLabTest()
        {
            using (MockContext context = MockContext.Start(this.GetType()))
            {
                var newTitle             = "new title";
                LabServicesClient client = GetManagedLabsClient(context);

                var labUpdate = new LabUpdate
                {
                    Title = newTitle
                };

                var labResponse = client.Labs.Update(body: labUpdate, resourceGroupName: rg, labName: labName);
                Assert.NotNull(labResponse);
                Assert.IsType <Lab>(labResponse);
                Assert.Equal(newTitle, labResponse.Title);
            }
        }
コード例 #3
0
 /// <summary>
 /// Update a lab resource.
 /// </summary>
 /// <remarks>
 /// Operation to update a lab resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// The request body.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='labName'>
 /// The name of the lab that uniquely identifies it within containing lab
 /// account. Used in resource URIs.
 /// </param>
 public static Lab BeginUpdate(this ILabsOperations operations, LabUpdate body, string resourceGroupName, string labName)
 {
     return(operations.BeginUpdateAsync(body, resourceGroupName, labName).GetAwaiter().GetResult());
 }