コード例 #1
0
 /// <summary>Snippet for Delete</summary>
 public void DeleteRequestObject()
 {
     // Snippet: Delete(DeleteRegionOperationRequest, CallSettings)
     // Create client
     RegionOperationsClient regionOperationsClient = RegionOperationsClient.Create();
     // Initialize request argument(s)
     DeleteRegionOperationRequest request = new DeleteRegionOperationRequest
     {
         Operation = "",
         Region    = "",
         Project   = "",
     };
     // Make the request
     DeleteRegionOperationResponse response = regionOperationsClient.Delete(request);
     // End snippet
 }
コード例 #2
0
        /// <summary>Snippet for DeleteAsync</summary>
        public async Task DeleteRequestObjectAsync()
        {
            // Snippet: DeleteAsync(DeleteRegionOperationRequest, CallSettings)
            // Additional: DeleteAsync(DeleteRegionOperationRequest, CancellationToken)
            // Create client
            RegionOperationsClient regionOperationsClient = await RegionOperationsClient.CreateAsync();

            // Initialize request argument(s)
            DeleteRegionOperationRequest request = new DeleteRegionOperationRequest
            {
                Operation = "",
                Region    = "",
                Project   = "",
            };
            // Make the request
            DeleteRegionOperationResponse response = await regionOperationsClient.DeleteAsync(request);

            // End snippet
        }
コード例 #3
0
        public void Delete()
        {
            moq::Mock <RegionOperations.RegionOperationsClient> mockGrpcClient = new moq::Mock <RegionOperations.RegionOperationsClient>(moq::MockBehavior.Strict);
            DeleteRegionOperationRequest request = new DeleteRegionOperationRequest
            {
                Operation = "operation615a23f7",
                Region    = "regionedb20d96",
                Project   = "projectaa6ff846",
            };
            DeleteRegionOperationResponse expectedResponse = new DeleteRegionOperationResponse {
            };

            mockGrpcClient.Setup(x => x.Delete(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            RegionOperationsClient        client   = new RegionOperationsClientImpl(mockGrpcClient.Object, null);
            DeleteRegionOperationResponse response = client.Delete(request.Project, request.Region, request.Operation);

            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
コード例 #4
0
        public async stt::Task DeleteAsync()
        {
            moq::Mock <RegionOperations.RegionOperationsClient> mockGrpcClient = new moq::Mock <RegionOperations.RegionOperationsClient>(moq::MockBehavior.Strict);
            DeleteRegionOperationRequest request = new DeleteRegionOperationRequest
            {
                Operation = "operation615a23f7",
                Region    = "regionedb20d96",
                Project   = "projectaa6ff846",
            };
            DeleteRegionOperationResponse expectedResponse = new DeleteRegionOperationResponse {
            };

            mockGrpcClient.Setup(x => x.DeleteAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <DeleteRegionOperationResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            RegionOperationsClient        client = new RegionOperationsClientImpl(mockGrpcClient.Object, null);
            DeleteRegionOperationResponse responseCallSettings = await client.DeleteAsync(request.Project, request.Region, request.Operation, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            DeleteRegionOperationResponse responseCancellationToken = await client.DeleteAsync(request.Project, request.Region, request.Operation, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
コード例 #5
0
 /// <summary>
 /// Deletes the specified region-specific Operations resource.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public override stt::Task <DeleteRegionOperationResponse> DeleteAsync(DeleteRegionOperationRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_DeleteRegionOperationRequest(ref request, ref callSettings);
     return(_callDelete.Async(request, callSettings));
 }
コード例 #6
0
 partial void Modify_DeleteRegionOperationRequest(ref DeleteRegionOperationRequest request, ref gaxgrpc::CallSettings settings);
コード例 #7
0
 /// <summary>
 /// Deletes the specified region-specific Operations resource.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <DeleteRegionOperationResponse> DeleteAsync(DeleteRegionOperationRequest request, st::CancellationToken cancellationToken) =>
 DeleteAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
コード例 #8
0
 /// <summary>
 /// Deletes the specified region-specific Operations resource.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <DeleteRegionOperationResponse> DeleteAsync(DeleteRegionOperationRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();