/// <summary>
        /// Run the code example.
        /// </summary>
        /// <param name="user">The Dfa user object running the code example.
        /// </param>
        public override void Run(DfaUser user)
        {
            // Create PlacementRemoteService instance.
              PlacementRemoteService service = (PlacementRemoteService) user.GetService(
              DfaService.v1_20.PlacementRemoteService);

              String searchString = _T("INSERT_SEARCH_STRING_HERE");

              // Set placement search criteria.
              PlacementSearchCriteria searchCriteria = new PlacementSearchCriteria();
              searchCriteria.pageSize = 10;
              searchCriteria.searchString = searchString;

              try {
            // Get placements.
            PlacementRecordSet placements = service.getPlacementsByCriteria(searchCriteria);

            // Display placment names and ids.
            if (placements.records != null) {
              foreach (Placement result in placements.records) {
            Console.WriteLine("Placment with name \"{0}\" and id \"{1}\" was found.",
                result.name, result.id);
              }
            } else {
              Console.WriteLine("No placements found for your criteria");
            }
              } catch (Exception e) {
            Console.WriteLine("Failed to retrieve placements. Exception says \"{0}\"", e.Message);
              }
        }
 public PlacementRecordSet getPlacementsByCriteria(PlacementSearchCriteria searchCriteria) {
   object[] results = this.Invoke("getPlacementsByCriteria", new object[] {searchCriteria});
   return ((PlacementRecordSet) (results[0]));
 }