/// <summary>Snippet for DeprecatedMessageMethod</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void DeprecatedMessageMethodRequestObject()
        {
            // Create client
            DeprecatedClient deprecatedClient = DeprecatedClient.Create();

            // Initialize request argument(s)
#pragma warning disable CS0612
            DeprecatedMessageRequest request = new DeprecatedMessageRequest {
            };
#pragma warning restore CS0612
            // Make the request
#pragma warning disable CS0612
            Response response = deprecatedClient.DeprecatedMessageMethod(request);
#pragma warning restore CS0612
        }
Exemple #2
0
        public void DeprecatedMessageMethodRequestObject()
        {
            moq::Mock <Deprecated.DeprecatedClient> mockGrpcClient = new moq::Mock <Deprecated.DeprecatedClient>(moq::MockBehavior.Strict);

#pragma warning disable CS0612
            DeprecatedMessageRequest request = new DeprecatedMessageRequest {
            };
#pragma warning restore CS0612
            Response expectedResponse = new Response {
            };
            mockGrpcClient.Setup(x => x.DeprecatedMessageMethod(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            DeprecatedClient client   = new DeprecatedClientImpl(mockGrpcClient.Object, null);
            Response         response = client.DeprecatedMessageMethod(request);
            xunit::Assert.Same(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        /// <summary>Snippet for DeprecatedMessageMethodAsync</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 DeprecatedMessageMethodRequestObjectAsync()
        {
            // Create client
            DeprecatedClient deprecatedClient = await DeprecatedClient.CreateAsync();

            // Initialize request argument(s)
#pragma warning disable CS0612
            DeprecatedMessageRequest request = new DeprecatedMessageRequest {
            };
#pragma warning restore CS0612
            // Make the request
#pragma warning disable CS0612
            Response response = await deprecatedClient.DeprecatedMessageMethodAsync(request);

#pragma warning restore CS0612
        }
Exemple #4
0
        /// <summary>Snippet for DeprecatedMessageMethodAsync</summary>
        public async Task DeprecatedMessageMethodRequestObjectAsync()
        {
            // Snippet: DeprecatedMessageMethodAsync(DeprecatedMessageRequest, CallSettings)
            // Additional: DeprecatedMessageMethodAsync(DeprecatedMessageRequest, CancellationToken)
            // Create client
            DeprecatedClient deprecatedClient = await DeprecatedClient.CreateAsync();

            // Initialize request argument(s)
#pragma warning disable CS0612
            DeprecatedMessageRequest request = new DeprecatedMessageRequest {
            };
#pragma warning restore CS0612
            // Make the request
            Response response = await deprecatedClient.DeprecatedMessageMethodAsync(request);

            // End snippet
        }
Exemple #5
0
        public async stt::Task DeprecatedMessageMethodRequestObjectAsync()
        {
            moq::Mock <Deprecated.DeprecatedClient> mockGrpcClient = new moq::Mock <Deprecated.DeprecatedClient>(moq::MockBehavior.Strict);

#pragma warning disable CS0612
            DeprecatedMessageRequest request = new DeprecatedMessageRequest {
            };
#pragma warning restore CS0612
            Response expectedResponse = new Response {
            };
            mockGrpcClient.Setup(x => x.DeprecatedMessageMethodAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <Response>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            DeprecatedClient client = new DeprecatedClientImpl(mockGrpcClient.Object, null);
            Response         responseCallSettings = await client.DeprecatedMessageMethodAsync(request, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            xunit::Assert.Same(expectedResponse, responseCallSettings);
            Response responseCancellationToken = await client.DeprecatedMessageMethodAsync(request, st::CancellationToken.None);

            xunit::Assert.Same(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
#pragma warning disable CS0612
        public override stt::Task <Response> DeprecatedMessageMethodAsync(DeprecatedMessageRequest request, gaxgrpc::CallSettings callSettings = null)
#pragma warning restore CS0612
        {
            Modify_DeprecatedMessageRequest(ref request, ref callSettings);
            return(_callDeprecatedMessageMethod.Async(request, callSettings));
        }
#pragma warning disable CS0612
        partial void Modify_DeprecatedMessageRequest(ref DeprecatedMessageRequest request, ref gaxgrpc::CallSettings settings);
#pragma warning disable CS0612
        public virtual stt::Task <Response> DeprecatedMessageMethodAsync(DeprecatedMessageRequest request, st::CancellationToken cancellationToken) =>
#pragma warning restore CS0612
        DeprecatedMessageMethodAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
#pragma warning disable CS0612
        public virtual stt::Task <Response> DeprecatedMessageMethodAsync(DeprecatedMessageRequest request, gaxgrpc::CallSettings callSettings = null) =>
#pragma warning restore CS0612
        throw new sys::NotImplementedException();
 public virtual AsyncUnaryCall <Response> DeprecatedMessageMethodAsync(DeprecatedMessageRequest request, CallOptions callOptions) => throw new NotImplementedException();
 public virtual Response DeprecatedMessageMethod(DeprecatedMessageRequest request, CallOptions callOptions) => throw new NotImplementedException();