Class InMemoryCompiledQuery<TResult, TEntity>
Compiled query over an in-memory entity set.
public sealed class InMemoryCompiledQuery<TResult, TEntity> : PreparedQueryCommand<TResult, TEntity>, IPreparedQueryCommand<TResult>
Type Parameters
TResultTEntity
- Inheritance
-
PreparedQueryCommand<TResult, TEntity>InMemoryCompiledQuery<TResult, TEntity>
- Implements
-
IPreparedQueryCommand<TResult>
- Inherited Members
- Extension Methods
Constructors
InMemoryCompiledQuery(Func<Func<TEntity, TResult>>, Func<TEntity, object[]?, bool>?, Func<object[]?, Func<TEntity, bool>>?, Func<TEntity, bool>?)
Creates a compiled in-memory query from lazily resolved projection and predicate factories.
public InMemoryCompiledQuery(Func<Func<TEntity, TResult>> func, Func<TEntity, object[]?, bool>? condition, Func<object[]?, Func<TEntity, bool>>? conditionFactory = null, Func<TEntity, bool>? conditionDirect = null)
Parameters
funcFunc<Func<TEntity, TResult>>Resolves the projection applied to each matching entity.
conditionFunc<TEntity, object[], bool>Predicate evaluated per entity with the current parameters, or null for an unconditional query.
conditionFactoryFunc<object[], Func<TEntity, bool>>Builds a strongly typed predicate from the current parameters, taking precedence over
conditionwhen supplied.conditionDirectFunc<TEntity, bool>Strongly typed predicate for parameterless conditions, used when no factory output is available.
Fields
Condition
Predicate evaluated per entity, receiving the current parameter values; null when the query is unconditional.
public readonly Func<TEntity, object[]?, bool>? Condition
Field Value
ConditionDirect
Strongly typed predicate for parameterless conditions.
public readonly Func<TEntity, bool>? ConditionDirect
Field Value
ConditionFactory
Builds a strongly typed predicate from the current parameter values (resolved once per query).
Avoids indexing/boxing object[] on every enumerated row.
public readonly Func<object[]?, Func<TEntity, bool>>? ConditionFactory