/// <summary>Snippet for GetGeographicView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetGeographicViewResourceNames() { // Create client GeographicViewServiceClient geographicViewServiceClient = GeographicViewServiceClient.Create(); // Initialize request argument(s) GeographicViewName resourceName = GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"); // Make the request GeographicView response = geographicViewServiceClient.GetGeographicView(resourceName); }
/// <summary>Snippet for GetGeographicView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetGeographicView() { // Create client GeographicViewServiceClient geographicViewServiceClient = GeographicViewServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER_ID]/geographicViews/[COUNTRY_CRITERION_ID]~[LOCATION_TYPE]"; // Make the request GeographicView response = geographicViewServiceClient.GetGeographicView(resourceName); }
/// <summary>Snippet for GetGeographicView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetGeographicView() { // Create client GeographicViewServiceClient geographicViewServiceClient = GeographicViewServiceClient.Create(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER]/geographicViews/[GEOGRAPHIC_VIEW]"; // Make the request GeographicView response = geographicViewServiceClient.GetGeographicView(resourceName); }
/// <summary>Snippet for GetGeographicView</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetGeographicViewResourceNames() { // Create client GeographicViewServiceClient geographicViewServiceClient = GeographicViewServiceClient.Create(); // Initialize request argument(s) GeographicViewName resourceName = GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"); // Make the request GeographicView response = geographicViewServiceClient.GetGeographicView(resourceName); }
/// <summary>Snippet for GetGeographicViewAsync</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 GetGeographicViewRequestObjectAsync() { // Create client GeographicViewServiceClient geographicViewServiceClient = await GeographicViewServiceClient.CreateAsync(); // Initialize request argument(s) GetGeographicViewRequest request = new GetGeographicViewRequest { ResourceNameAsGeographicViewName = GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; // Make the request GeographicView response = await geographicViewServiceClient.GetGeographicViewAsync(request); }
/// <summary>Snippet for GetGeographicViewAsync</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 GetGeographicViewRequestObjectAsync() { // Create client GeographicViewServiceClient geographicViewServiceClient = await GeographicViewServiceClient.CreateAsync(); // Initialize request argument(s) GetGeographicViewRequest request = new GetGeographicViewRequest { ResourceNameAsGeographicViewName = GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), }; // Make the request GeographicView response = await geographicViewServiceClient.GetGeographicViewAsync(request); }
/// <summary>Snippet for GetGeographicViewAsync</summary> public async Task GetGeographicViewAsync() { // Snippet: GetGeographicViewAsync(string, CallSettings) // Additional: GetGeographicViewAsync(string, CancellationToken) // Create client GeographicViewServiceClient geographicViewServiceClient = await GeographicViewServiceClient.CreateAsync(); // Initialize request argument(s) string resourceName = "customers/[CUSTOMER]/geographicViews/[GEOGRAPHIC_VIEW]"; // Make the request GeographicView response = await geographicViewServiceClient.GetGeographicViewAsync(resourceName); // End snippet }
/// <summary>Snippet for GetGeographicView</summary> public void GetGeographicViewRequestObject() { // Snippet: GetGeographicView(GetGeographicViewRequest, CallSettings) // Create client GeographicViewServiceClient geographicViewServiceClient = GeographicViewServiceClient.Create(); // Initialize request argument(s) GetGeographicViewRequest request = new GetGeographicViewRequest { ResourceNameAsGeographicViewName = GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"), }; // Make the request GeographicView response = geographicViewServiceClient.GetGeographicView(request); // End snippet }
/// <summary>Snippet for GetGeographicViewAsync</summary> public async Task GetGeographicViewResourceNamesAsync() { // Snippet: GetGeographicViewAsync(GeographicViewName, CallSettings) // Additional: GetGeographicViewAsync(GeographicViewName, CancellationToken) // Create client GeographicViewServiceClient geographicViewServiceClient = await GeographicViewServiceClient.CreateAsync(); // Initialize request argument(s) GeographicViewName resourceName = GeographicViewName.FromCustomerGeographicView("[CUSTOMER]", "[GEOGRAPHIC_VIEW]"); // Make the request GeographicView response = await geographicViewServiceClient.GetGeographicViewAsync(resourceName); // End snippet }
/// <summary>Snippet for GetGeographicView</summary> public void GetGeographicViewRequestObject() { // Snippet: GetGeographicView(GetGeographicViewRequest, CallSettings) // Create client GeographicViewServiceClient geographicViewServiceClient = GeographicViewServiceClient.Create(); // Initialize request argument(s) GetGeographicViewRequest request = new GetGeographicViewRequest { ResourceNameAsGeographicViewName = GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"), }; // Make the request GeographicView response = geographicViewServiceClient.GetGeographicView(request); // End snippet }
/// <summary>Snippet for GetGeographicViewAsync</summary> public async Task GetGeographicViewResourceNamesAsync() { // Snippet: GetGeographicViewAsync(GeographicViewName, CallSettings) // Additional: GetGeographicViewAsync(GeographicViewName, CancellationToken) // Create client GeographicViewServiceClient geographicViewServiceClient = await GeographicViewServiceClient.CreateAsync(); // Initialize request argument(s) GeographicViewName resourceName = GeographicViewName.FromCustomerCountryCriterionLocationType("[CUSTOMER_ID]", "[COUNTRY_CRITERION_ID]", "[LOCATION_TYPE]"); // Make the request GeographicView response = await geographicViewServiceClient.GetGeographicViewAsync(resourceName); // End snippet }
public void GetGeographicView2() { Mock <GeographicViewService.GeographicViewServiceClient> mockGrpcClient = new Mock <GeographicViewService.GeographicViewServiceClient>(MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { ResourceName = new GeographicViewName("[CUSTOMER]", "[GEOGRAPHIC_VIEW]").ToString(), }; GeographicView expectedResponse = new GeographicView { ResourceName = "resourceName2625949903", }; mockGrpcClient.Setup(x => x.GetGeographicView(request, It.IsAny <CallOptions>())) .Returns(expectedResponse); GeographicViewServiceClient client = new GeographicViewServiceClientImpl(mockGrpcClient.Object, null); GeographicView response = client.GetGeographicView(request); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async Task GetGeographicViewAsync2() { Mock <GeographicViewService.GeographicViewServiceClient> mockGrpcClient = new Mock <GeographicViewService.GeographicViewServiceClient>(MockBehavior.Strict); GetGeographicViewRequest request = new GetGeographicViewRequest { ResourceName = new GeographicViewName("[CUSTOMER]", "[GEOGRAPHIC_VIEW]").ToString(), }; GeographicView expectedResponse = new GeographicView { ResourceName = "resourceName2625949903", }; mockGrpcClient.Setup(x => x.GetGeographicViewAsync(request, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <GeographicView>(Task.FromResult(expectedResponse), null, null, null, null)); GeographicViewServiceClient client = new GeographicViewServiceClientImpl(mockGrpcClient.Object, null); GeographicView response = await client.GetGeographicViewAsync(request); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }