/// <summary>Snippet for GetFeedPlaceholderView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetFeedPlaceholderViewResourceNames()
 {
     // Create client
     FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = FeedPlaceholderViewServiceClient.Create();
     // Initialize request argument(s)
     FeedPlaceholderViewName resourceName = FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]");
     // Make the request
     FeedPlaceholderView response = feedPlaceholderViewServiceClient.GetFeedPlaceholderView(resourceName);
 }
Exemplo n.º 2
0
        /// <summary>Snippet for GetFeedPlaceholderViewAsync</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 GetFeedPlaceholderViewResourceNamesAsync()
        {
            // Create client
            FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = await FeedPlaceholderViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            FeedPlaceholderViewName resourceName = FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]");
            // Make the request
            FeedPlaceholderView response = await feedPlaceholderViewServiceClient.GetFeedPlaceholderViewAsync(resourceName);
        }
 /// <summary>Snippet for GetFeedPlaceholderView</summary>
 public void GetFeedPlaceholderViewResourceNames()
 {
     // Snippet: GetFeedPlaceholderView(FeedPlaceholderViewName, CallSettings)
     // Create client
     FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = FeedPlaceholderViewServiceClient.Create();
     // Initialize request argument(s)
     FeedPlaceholderViewName resourceName = FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]");
     // Make the request
     FeedPlaceholderView response = feedPlaceholderViewServiceClient.GetFeedPlaceholderView(resourceName);
     // End snippet
 }
 /// <summary>Snippet for GetFeedPlaceholderView</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetFeedPlaceholderViewRequestObject()
 {
     // Create client
     FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = FeedPlaceholderViewServiceClient.Create();
     // Initialize request argument(s)
     GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest
     {
         ResourceNameAsFeedPlaceholderViewName = FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"),
     };
     // Make the request
     FeedPlaceholderView response = feedPlaceholderViewServiceClient.GetFeedPlaceholderView(request);
 }
        /// <summary>Snippet for GetFeedPlaceholderViewAsync</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 GetFeedPlaceholderViewRequestObjectAsync()
        {
            // Create client
            FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = await FeedPlaceholderViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest
            {
                ResourceNameAsFeedPlaceholderViewName = FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"),
            };
            // Make the request
            FeedPlaceholderView response = await feedPlaceholderViewServiceClient.GetFeedPlaceholderViewAsync(request);
        }
Exemplo n.º 6
0
 /// <summary>Snippet for GetFeedPlaceholderView</summary>
 public void GetFeedPlaceholderViewRequestObject()
 {
     // Snippet: GetFeedPlaceholderView(GetFeedPlaceholderViewRequest, CallSettings)
     // Create client
     FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = FeedPlaceholderViewServiceClient.Create();
     // Initialize request argument(s)
     GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest
     {
         ResourceNameAsFeedPlaceholderViewName = FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]"),
     };
     // Make the request
     FeedPlaceholderView response = feedPlaceholderViewServiceClient.GetFeedPlaceholderView(request);
     // End snippet
 }
Exemplo n.º 7
0
        /// <summary>Snippet for GetFeedPlaceholderViewAsync</summary>
        public async Task GetFeedPlaceholderViewResourceNamesAsync()
        {
            // Snippet: GetFeedPlaceholderViewAsync(FeedPlaceholderViewName, CallSettings)
            // Additional: GetFeedPlaceholderViewAsync(FeedPlaceholderViewName, CancellationToken)
            // Create client
            FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = await FeedPlaceholderViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            FeedPlaceholderViewName resourceName = FeedPlaceholderViewName.FromCustomerPlaceholderType("[CUSTOMER_ID]", "[PLACEHOLDER_TYPE]");
            // Make the request
            FeedPlaceholderView response = await feedPlaceholderViewServiceClient.GetFeedPlaceholderViewAsync(resourceName);

            // End snippet
        }
        /// <summary>Snippet for GetFeedPlaceholderViewAsync</summary>
        public async Task GetFeedPlaceholderViewRequestObjectAsync()
        {
            // Snippet: GetFeedPlaceholderViewAsync(GetFeedPlaceholderViewRequest, CallSettings)
            // Additional: GetFeedPlaceholderViewAsync(GetFeedPlaceholderViewRequest, CancellationToken)
            // Create client
            FeedPlaceholderViewServiceClient feedPlaceholderViewServiceClient = await FeedPlaceholderViewServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetFeedPlaceholderViewRequest request = new GetFeedPlaceholderViewRequest
            {
                ResourceNameAsFeedPlaceholderViewName = FeedPlaceholderViewName.FromCustomerFeedPlaceholderView("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]"),
            };
            // Make the request
            FeedPlaceholderView response = await feedPlaceholderViewServiceClient.GetFeedPlaceholderViewAsync(request);

            // End snippet
        }
 public async Task GetFeedPlaceholderViewAsync()
 {
     Mock<FeedPlaceholderViewService.FeedPlaceholderViewServiceClient> mockGrpcClient = new Mock<FeedPlaceholderViewService.FeedPlaceholderViewServiceClient>(MockBehavior.Strict);
     GetFeedPlaceholderViewRequest expectedRequest = new GetFeedPlaceholderViewRequest
     {
         ResourceName = new FeedPlaceholderViewName("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]").ToString(),
     };
     FeedPlaceholderView expectedResponse = new FeedPlaceholderView
     {
         ResourceName = "resourceName2625949903",
     };
     mockGrpcClient.Setup(x => x.GetFeedPlaceholderViewAsync(expectedRequest, It.IsAny<CallOptions>()))
         .Returns(new Grpc.Core.AsyncUnaryCall<FeedPlaceholderView>(Task.FromResult(expectedResponse), null, null, null, null));
     FeedPlaceholderViewServiceClient client = new FeedPlaceholderViewServiceClientImpl(mockGrpcClient.Object, null);
     string formattedResourceName = new FeedPlaceholderViewName("[CUSTOMER]", "[FEED_PLACEHOLDER_VIEW]").ToString();
     FeedPlaceholderView response = await client.GetFeedPlaceholderViewAsync(formattedResourceName);
     Assert.AreEqual(expectedResponse, response);
     mockGrpcClient.VerifyAll();
 }