コード例 #1
0
        /// <summary>Snippet for DeleteSchema</summary>
        public void DeleteSchemaRequestObject()
        {
            // Snippet: DeleteSchema(DeleteSchemaRequest, CallSettings)
            // Create client
            SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
            // Initialize request argument(s)
            DeleteSchemaRequest request = new DeleteSchemaRequest
            {
                SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
            };

            // Make the request
            schemaServiceClient.DeleteSchema(request);
            // End snippet
        }
コード例 #2
0
        public void DeleteSchemaResourceNames()
        {
            moq::Mock <SchemaService.SchemaServiceClient> mockGrpcClient = new moq::Mock <SchemaService.SchemaServiceClient>(moq::MockBehavior.Strict);
            DeleteSchemaRequest request = new DeleteSchemaRequest
            {
                SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

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

            client.DeleteSchema(request.SchemaName);
            mockGrpcClient.VerifyAll();
        }
コード例 #3
0
        /// <summary>Snippet for DeleteSchemaAsync</summary>
        public async Task DeleteSchemaRequestObjectAsync()
        {
            // Snippet: DeleteSchemaAsync(DeleteSchemaRequest, CallSettings)
            // Additional: DeleteSchemaAsync(DeleteSchemaRequest, CancellationToken)
            // Create client
            SchemaServiceClient schemaServiceClient = await SchemaServiceClient.CreateAsync();

            // Initialize request argument(s)
            DeleteSchemaRequest request = new DeleteSchemaRequest
            {
                SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
            };
            // Make the request
            await schemaServiceClient.DeleteSchemaAsync(request);

            // End snippet
        }
コード例 #4
0
        public async stt::Task DeleteSchemaResourceNamesAsync()
        {
            moq::Mock <SchemaService.SchemaServiceClient> mockGrpcClient = new moq::Mock <SchemaService.SchemaServiceClient>(moq::MockBehavior.Strict);
            DeleteSchemaRequest request = new DeleteSchemaRequest
            {
                SchemaName = SchemaName.FromProjectSchema("[PROJECT]", "[SCHEMA]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

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

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

            mockGrpcClient.VerifyAll();
        }