Exemple #1
0
 /// <summary>Snippet for ListPlannableLocations</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void ListPlannableLocationsRequestObject()
 {
     // Create client
     ReachPlanServiceClient reachPlanServiceClient = ReachPlanServiceClient.Create();
     // Initialize request argument(s)
     ListPlannableLocationsRequest request = new ListPlannableLocationsRequest {
     };
     // Make the request
     ListPlannableLocationsResponse response = reachPlanServiceClient.ListPlannableLocations(request);
 }
        /// <summary>
        /// Maps friendly names of plannable locations to location IDs usable with
        /// <see cref="ReachPlanServiceClient"/>.
        /// </summary>
        /// <param name="reachPlanService">Instance of Reach Plan Service client.</param>
        public void ShowPlannableLocations(ReachPlanServiceClient reachPlanService)
        {
            ListPlannableLocationsRequest  request  = new ListPlannableLocationsRequest();
            ListPlannableLocationsResponse response = reachPlanService.ListPlannableLocations(
                request);

            Console.WriteLine("Plannable Locations:");
            Console.WriteLine("Name,\tId,\t,ParentCountryId");
            foreach (PlannableLocation location in response.PlannableLocations)
            {
                Console.WriteLine(
                    $"\"{location.Name}\",\t{location.Id},{location.ParentCountryId}");
            }
        }