Beispiel #1
0
        public InvokeQueryTarget[] GetTargets()
        {
            Verify();
            var count = navigator_invoke_query_result_action_get_target_count(handle);

            if (count < 0)
            {
                return(null);
            }
            else if (count == 0)
            {
                return(new InvokeQueryTarget[0]);
            }
            //XXX Should this maybe be an enumeration? As in, someone is only looking for one particular element and don't care about the others... so we don't need to get "all of them"
            var results = new InvokeQueryTarget[count];

            for (var i = 0; i < count; i++)
            {
                results[i] = new InvokeQueryTarget(navigator_invoke_query_result_action_get_target(handle, i), ev);
            }
            return(results);
        }
 public InvokeQueryTarget[] GetTargets()
 {
     Verify();
     var count = navigator_invoke_query_result_action_get_target_count(handle);
     if (count < 0)
     {
         return null;
     }
     else if (count == 0)
     {
         return new InvokeQueryTarget[0];
     }
     //XXX Should this maybe be an enumeration? As in, someone is only looking for one particular element and don't care about the others... so we don't need to get "all of them"
     var results = new InvokeQueryTarget[count];
     for (var i = 0; i < count; i++)
     {
         results[i] = new InvokeQueryTarget(navigator_invoke_query_result_action_get_target(handle, i), ev);
     }
     return results;
 }