Esempio n. 1
0
 /// <summary>Snippet for GetCustomer</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCustomerResourceNames()
 {
     // Create client
     CustomerServiceClient customerServiceClient = CustomerServiceClient.Create();
     // Initialize request argument(s)
     CustomerName resourceName = CustomerName.FromCustomer("[CUSTOMER_ID]");
     // Make the request
     Customer response = customerServiceClient.GetCustomer(resourceName);
 }
        /// <summary>Snippet for GetCustomerAsync</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 GetCustomerResourceNamesAsync()
        {
            // Create client
            CustomerServiceClient customerServiceClient = await CustomerServiceClient.CreateAsync();

            // Initialize request argument(s)
            CustomerName resourceName = CustomerName.FromCustomer("[CUSTOMER_ID]");
            // Make the request
            Customer response = await customerServiceClient.GetCustomerAsync(resourceName);
        }
 /// <summary>Snippet for GetCustomer</summary>
 public void GetCustomerResourceNames()
 {
     // Snippet: GetCustomer(CustomerName, CallSettings)
     // Create client
     CustomerServiceClient customerServiceClient = CustomerServiceClient.Create();
     // Initialize request argument(s)
     CustomerName resourceName = CustomerName.FromCustomer("[CUSTOMER]");
     // Make the request
     Customer response = customerServiceClient.GetCustomer(resourceName);
     // End snippet
 }
Esempio n. 4
0
 /// <summary>Snippet for GetCustomer</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCustomerRequestObject()
 {
     // Create client
     CustomerServiceClient customerServiceClient = CustomerServiceClient.Create();
     // Initialize request argument(s)
     GetCustomerRequest request = new GetCustomerRequest
     {
         ResourceNameAsCustomerName = CustomerName.FromCustomer("[CUSTOMER_ID]"),
     };
     // Make the request
     Customer response = customerServiceClient.GetCustomer(request);
 }
        /// <summary>Snippet for GetCustomerAsync</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 GetCustomerRequestObjectAsync()
        {
            // Create client
            CustomerServiceClient customerServiceClient = await CustomerServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetCustomerRequest request = new GetCustomerRequest
            {
                ResourceNameAsCustomerName = CustomerName.FromCustomer("[CUSTOMER]"),
            };
            // Make the request
            Customer response = await customerServiceClient.GetCustomerAsync(request);
        }
        /// <summary>Snippet for GetCustomerAsync</summary>
        public async Task GetCustomerResourceNamesAsync()
        {
            // Snippet: GetCustomerAsync(CustomerName, CallSettings)
            // Additional: GetCustomerAsync(CustomerName, CancellationToken)
            // Create client
            CustomerServiceClient customerServiceClient = await CustomerServiceClient.CreateAsync();

            // Initialize request argument(s)
            CustomerName resourceName = CustomerName.FromCustomer("[CUSTOMER_ID]");
            // Make the request
            Customer response = await customerServiceClient.GetCustomerAsync(resourceName);

            // End snippet
        }