private IEnumerable <object> GetAllProjectTargetProxies(string project)
 {
     if (Http || !Https)
     {
         TargetHttpProxiesResource.ListRequest request = Service.TargetHttpProxies.List(project);
         do
         {
             TargetHttpProxyList response = request.Execute();
             if (response.Items != null)
             {
                 foreach (TargetHttpProxy targetProxy in response.Items)
                 {
                     yield return(targetProxy);
                 }
             }
             request.PageToken = response.NextPageToken;
         } while (!Stopping && request.PageToken != null);
     }
     if (Https || !Http)
     {
         TargetHttpsProxiesResource.ListRequest request = Service.TargetHttpsProxies.List(project);
         do
         {
             TargetHttpsProxyList response = request.Execute();
             if (response.Items != null)
             {
                 foreach (TargetHttpsProxy targetProxy in response.Items)
                 {
                     yield return(targetProxy);
                 }
             }
             request.PageToken = response.NextPageToken;
         } while (!Stopping && request.PageToken != null);
     }
 }
Ejemplo n.º 2
0
 /// <summary>Snippet for List</summary>
 public void List()
 {
     // Snippet: List(string, CallSettings)
     // Create client
     TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.Create();
     // Initialize request argument(s)
     string project = "";
     // Make the request
     TargetHttpsProxyList response = targetHttpsProxiesClient.List(project);
     // End snippet
 }
Ejemplo n.º 3
0
        /// <summary>Snippet for ListAsync</summary>
        public async Task ListAsync()
        {
            // Snippet: ListAsync(string, CallSettings)
            // Additional: ListAsync(string, CancellationToken)
            // Create client
            TargetHttpsProxiesClient targetHttpsProxiesClient = await TargetHttpsProxiesClient.CreateAsync();

            // Initialize request argument(s)
            string project = "";
            // Make the request
            TargetHttpsProxyList response = await targetHttpsProxiesClient.ListAsync(project);

            // End snippet
        }
Ejemplo n.º 4
0
 /// <summary>Snippet for List</summary>
 public void ListRequestObject()
 {
     // Snippet: List(ListTargetHttpsProxiesRequest, CallSettings)
     // Create client
     TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.Create();
     // Initialize request argument(s)
     ListTargetHttpsProxiesRequest request = new ListTargetHttpsProxiesRequest
     {
         PageToken            = "",
         MaxResults           = 0U,
         OrderBy              = "",
         Project              = "",
         Filter               = "",
         ReturnPartialSuccess = false,
     };
     // Make the request
     TargetHttpsProxyList response = targetHttpsProxiesClient.List(request);
     // End snippet
 }
Ejemplo n.º 5
0
        /// <summary>Snippet for ListAsync</summary>
        public async Task ListRequestObjectAsync()
        {
            // Snippet: ListAsync(ListTargetHttpsProxiesRequest, CallSettings)
            // Additional: ListAsync(ListTargetHttpsProxiesRequest, CancellationToken)
            // Create client
            TargetHttpsProxiesClient targetHttpsProxiesClient = await TargetHttpsProxiesClient.CreateAsync();

            // Initialize request argument(s)
            ListTargetHttpsProxiesRequest request = new ListTargetHttpsProxiesRequest
            {
                PageToken            = "",
                MaxResults           = 0U,
                OrderBy              = "",
                Project              = "",
                Filter               = "",
                ReturnPartialSuccess = false,
            };
            // Make the request
            TargetHttpsProxyList response = await targetHttpsProxiesClient.ListAsync(request);

            // End snippet
        }