/// <summary>Snippet for DeleteScanConfig</summary>
        public void DeleteScanConfigRequestObject()
        {
            // Snippet: DeleteScanConfig(DeleteScanConfigRequest, CallSettings)
            // Create client
            WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.Create();
            // Initialize request argument(s)
            DeleteScanConfigRequest request = new DeleteScanConfigRequest {
                Name = "",
            };

            // Make the request
            webSecurityScannerClient.DeleteScanConfig(request);
            // End snippet
        }
        /// <summary>Snippet for DeleteScanConfigAsync</summary>
        public async Task DeleteScanConfigRequestObjectAsync()
        {
            // Snippet: DeleteScanConfigAsync(DeleteScanConfigRequest, CallSettings)
            // Additional: DeleteScanConfigAsync(DeleteScanConfigRequest, CancellationToken)
            // Create client
            WebSecurityScannerClient webSecurityScannerClient = await WebSecurityScannerClient.CreateAsync();

            // Initialize request argument(s)
            DeleteScanConfigRequest request = new DeleteScanConfigRequest {
                Name = "",
            };
            // Make the request
            await webSecurityScannerClient.DeleteScanConfigAsync(request);

            // End snippet
        }
예제 #3
0
        public void DeleteScanConfigRequestObject()
        {
            moq::Mock <WebSecurityScanner.WebSecurityScannerClient> mockGrpcClient = new moq::Mock <WebSecurityScanner.WebSecurityScannerClient>(moq::MockBehavior.Strict);
            DeleteScanConfigRequest request = new DeleteScanConfigRequest
            {
                Name = "name1c9368b0",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteScanConfig(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            WebSecurityScannerClient client = new WebSecurityScannerClientImpl(mockGrpcClient.Object, null);

            client.DeleteScanConfig(request);
            mockGrpcClient.VerifyAll();
        }
예제 #4
0
        public async stt::Task DeleteScanConfigRequestObjectAsync()
        {
            moq::Mock <WebSecurityScanner.WebSecurityScannerClient> mockGrpcClient = new moq::Mock <WebSecurityScanner.WebSecurityScannerClient>(moq::MockBehavior.Strict);
            DeleteScanConfigRequest request = new DeleteScanConfigRequest
            {
                Name = "name1c9368b0",
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

            mockGrpcClient.Setup(x => x.DeleteScanConfigAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <wkt::Empty>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            WebSecurityScannerClient client = new WebSecurityScannerClientImpl(mockGrpcClient.Object, null);
            await client.DeleteScanConfigAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            await client.DeleteScanConfigAsync(request, st::CancellationToken.None);

            mockGrpcClient.VerifyAll();
        }