IEnumerator <T> IEnumerable <T> .GetEnumerator()
        {
            if (_count == 0)
            {
                yield break;
            }

            if (_entries != null)
            {
                foreach (SearchResultEntry entry in _entries)
                {
                    yield return((T)_resultTransformer.Transform(entry));
                }
            }
            else
            {
                foreach (SearchResultEntry entry in _enumerableEntries)
                {
                    yield return((T)_resultTransformer.Transform(entry));
                }
            }
        }
예제 #2
0
 public IList Execute()
 {
     try
     {
         object value  = methodInfo.Invoke(instance, new object[0]);
         IList  result = resultTransformer.Transform(value);
         return(result);
     }
     catch (TargetInvocationException exception)
     {
         throw exception.InnerException;
     }
 }