Ejemplo n.º 1
0
        /// <summary>Snippet for DeleteUptimeCheckConfig</summary>
        public void DeleteUptimeCheckConfig_RequestObject()
        {
            // Snippet: DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest,CallSettings)
            // Create client
            UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.Create();
            // Initialize request argument(s)
            DeleteUptimeCheckConfigRequest request = new DeleteUptimeCheckConfigRequest
            {
                Name = new UptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]").ToString(),
            };

            // Make the request
            uptimeCheckServiceClient.DeleteUptimeCheckConfig(request);
            // End snippet
        }
Ejemplo n.º 2
0
        public async Task DeleteUptimeCheckConfigAsync2()
        {
            Mock <UptimeCheckService.UptimeCheckServiceClient> mockGrpcClient = new Mock <UptimeCheckService.UptimeCheckServiceClient>(MockBehavior.Strict);
            DeleteUptimeCheckConfigRequest request = new DeleteUptimeCheckConfigRequest
            {
                UptimeCheckConfigName = new UptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]"),
            };
            Empty expectedResponse = new Empty();

            mockGrpcClient.Setup(x => x.DeleteUptimeCheckConfigAsync(request, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <Empty>(Task.FromResult(expectedResponse), null, null, null, null));
            UptimeCheckServiceClient client = new UptimeCheckServiceClientImpl(mockGrpcClient.Object, null);
            await client.DeleteUptimeCheckConfigAsync(request);

            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 3
0
        public void DeleteUptimeCheckConfig2()
        {
            Mock <UptimeCheckService.UptimeCheckServiceClient> mockGrpcClient = new Mock <UptimeCheckService.UptimeCheckServiceClient>(MockBehavior.Strict);
            DeleteUptimeCheckConfigRequest request = new DeleteUptimeCheckConfigRequest
            {
                UptimeCheckConfigName = new UptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]"),
            };
            Empty expectedResponse = new Empty();

            mockGrpcClient.Setup(x => x.DeleteUptimeCheckConfig(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            UptimeCheckServiceClient client = new UptimeCheckServiceClientImpl(mockGrpcClient.Object, null);

            client.DeleteUptimeCheckConfig(request);
            mockGrpcClient.VerifyAll();
        }
Ejemplo n.º 4
0
        /// <summary>Snippet for DeleteUptimeCheckConfigAsync</summary>
        public async Task DeleteUptimeCheckConfigAsync_RequestObject()
        {
            // Snippet: DeleteUptimeCheckConfigAsync(DeleteUptimeCheckConfigRequest,CallSettings)
            // Additional: DeleteUptimeCheckConfigAsync(DeleteUptimeCheckConfigRequest,CancellationToken)
            // Create client
            UptimeCheckServiceClient uptimeCheckServiceClient = await UptimeCheckServiceClient.CreateAsync();

            // Initialize request argument(s)
            DeleteUptimeCheckConfigRequest request = new DeleteUptimeCheckConfigRequest
            {
                Name = new UptimeCheckConfigName("[PROJECT]", "[UPTIME_CHECK_CONFIG]").ToString(),
            };
            // Make the request
            await uptimeCheckServiceClient.DeleteUptimeCheckConfigAsync(request);

            // End snippet
        }