コード例 #1
0
        /// <summary>Snippet for GetRowAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetRowRequestObjectAsync()
        {
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetRowRequest request = new GetRowRequest
            {
                RowName = RowName.FromTableRow("[TABLE]", "[ROW]"),
                View    = View.Unspecified,
            };
            // Make the request
            Row response = await tablesServiceClient.GetRowAsync(request);
        }
コード例 #2
0
        /// <summary>Snippet for DeleteRow</summary>
        public void DeleteRowRequestObject()
        {
            // Snippet: DeleteRow(DeleteRowRequest, CallSettings)
            // Create client
            TablesServiceClient tablesServiceClient = TablesServiceClient.Create();
            // Initialize request argument(s)
            DeleteRowRequest request = new DeleteRowRequest
            {
                RowName = RowName.FromTableRow("[TABLE]", "[ROW]"),
            };

            // Make the request
            tablesServiceClient.DeleteRow(request);
            // End snippet
        }
コード例 #3
0
 /// <summary>Snippet for GetRow</summary>
 public void GetRowRequestObject()
 {
     // Snippet: GetRow(GetRowRequest, CallSettings)
     // Create client
     TablesServiceClient tablesServiceClient = TablesServiceClient.Create();
     // Initialize request argument(s)
     GetRowRequest request = new GetRowRequest
     {
         RowName = RowName.FromTableRow("[TABLE]", "[ROW]"),
         View    = View.Unspecified,
     };
     // Make the request
     Row response = tablesServiceClient.GetRow(request);
     // End snippet
 }
コード例 #4
0
        public void DeleteRowResourceNames()
        {
            moq::Mock <TablesService.TablesServiceClient> mockGrpcClient = new moq::Mock <TablesService.TablesServiceClient>(moq::MockBehavior.Strict);
            DeleteRowRequest request = new DeleteRowRequest
            {
                RowName = RowName.FromTableRow("[TABLE]", "[ROW]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

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

            client.DeleteRow(request.RowName);
            mockGrpcClient.VerifyAll();
        }
コード例 #5
0
        /// <summary>Snippet for DeleteRowAsync</summary>
        public async Task DeleteRowRequestObjectAsync()
        {
            // Snippet: DeleteRowAsync(DeleteRowRequest, CallSettings)
            // Additional: DeleteRowAsync(DeleteRowRequest, CancellationToken)
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            DeleteRowRequest request = new DeleteRowRequest
            {
                RowName = RowName.FromTableRow("[TABLE]", "[ROW]"),
            };
            // Make the request
            await tablesServiceClient.DeleteRowAsync(request);

            // End snippet
        }
コード例 #6
0
        /// <summary>Snippet for BatchDeleteRows</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void BatchDeleteRowsRequestObject()
        {
            // Create client
            TablesServiceClient tablesServiceClient = TablesServiceClient.Create();
            // Initialize request argument(s)
            BatchDeleteRowsRequest request = new BatchDeleteRowsRequest
            {
                ParentAsTableName = TableName.FromTable("[TABLE]"),
                RowNames          =
                {
                    RowName.FromTableRow("[TABLE]", "[ROW]"),
                },
            };

            // Make the request
            tablesServiceClient.BatchDeleteRows(request);
        }
コード例 #7
0
        /// <summary>Snippet for GetRowAsync</summary>
        public async Task GetRowRequestObjectAsync()
        {
            // Snippet: GetRowAsync(GetRowRequest, CallSettings)
            // Additional: GetRowAsync(GetRowRequest, CancellationToken)
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetRowRequest request = new GetRowRequest
            {
                RowName = RowName.FromTableRow("[TABLE]", "[ROW]"),
                View    = View.Unspecified,
            };
            // Make the request
            Row response = await tablesServiceClient.GetRowAsync(request);

            // End snippet
        }
コード例 #8
0
        public async stt::Task DeleteRowResourceNamesAsync()
        {
            moq::Mock <TablesService.TablesServiceClient> mockGrpcClient = new moq::Mock <TablesService.TablesServiceClient>(moq::MockBehavior.Strict);
            DeleteRowRequest request = new DeleteRowRequest
            {
                RowName = RowName.FromTableRow("[TABLE]", "[ROW]"),
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

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

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

            mockGrpcClient.VerifyAll();
        }
コード例 #9
0
        public void BatchDeleteRowsRequestObject()
        {
            moq::Mock <TablesService.TablesServiceClient> mockGrpcClient = new moq::Mock <TablesService.TablesServiceClient>(moq::MockBehavior.Strict);
            BatchDeleteRowsRequest request = new BatchDeleteRowsRequest
            {
                ParentAsTableName = TableName.FromTable("[TABLE]"),
                RowNames          =
                {
                    RowName.FromTableRow("[TABLE]", "[ROW]"),
                },
            };
            wkt::Empty expectedResponse = new wkt::Empty {
            };

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

            client.BatchDeleteRows(request);
            mockGrpcClient.VerifyAll();
        }
コード例 #10
0
        /// <summary>Snippet for BatchDeleteRowsAsync</summary>
        public async Task BatchDeleteRowsRequestObjectAsync()
        {
            // Snippet: BatchDeleteRowsAsync(BatchDeleteRowsRequest, CallSettings)
            // Additional: BatchDeleteRowsAsync(BatchDeleteRowsRequest, CancellationToken)
            // Create client
            TablesServiceClient tablesServiceClient = await TablesServiceClient.CreateAsync();

            // Initialize request argument(s)
            BatchDeleteRowsRequest request = new BatchDeleteRowsRequest
            {
                ParentAsTableName = TableName.FromTable("[TABLE]"),
                RowNames          =
                {
                    RowName.FromTableRow("[TABLE]", "[ROW]"),
                },
            };
            // Make the request
            await tablesServiceClient.BatchDeleteRowsAsync(request);

            // End snippet
        }