Returns a specified number of results from a search.
Assembly: Epic.Query.Object
Declaration Syntax
C# |
public static ISlicedSearch<TEntity, TIdentity> Take<TEntity, TIdentity>( this IOrderedSearch<TEntity, TIdentity> search, uint count ) where TEntity : class where TIdentity : Object, IEquatable<TIdentity>
Generic Template Parameters
- TEntity
- The type of the entities searched by search.
- TIdentity
- The type of the identities of the entities searched by search.
Parameters
- search (IOrderedSearch<(Of <(<'TEntity, TIdentity>)>)>)
- A search for TEntity.
- count (UInt32)
- The number of results to return.
Return Value
An ISlicedSearch<(Of <(<'TEntity, TIdentity>)>)> that returns
at most count results.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IOrderedSearch<(Of <(<'TEntity, TIdentity>)>)>. When you use instance method syntax to call this method, omit the first parameter.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | search is nullNothingnullptr. |
ArgumentOutOfRangeException | count is 0. |