Class ExclusiveProjectionBuilder<T>
A builder for exclusive projections.
public class ExclusiveProjectionBuilder<T> : ProjectionBuilderBase<T, ExclusiveProjectionBuilder<T>>, IProjectionBuilder
Type Parameters
TThe type of the document.
- Inheritance
-
ExclusiveProjectionBuilder<T>
- Implements
- Inherited Members
Methods
Clone()
Creates a copy of this projection builder.
public override IProjectionBuilder Clone()
Returns
Exclude(string)
Specify a field to exclude from the projection.
public ExclusiveProjectionBuilder<T> Exclude(string fieldName)
Parameters
fieldNamestringThe name of the field to exclude.
Returns
- ExclusiveProjectionBuilder<T>
The projection builder.
Exclude<TField>(Expression<Func<T, TField>>)
Specify a field to exclude from the projection.
public ExclusiveProjectionBuilder<T> Exclude<TField>(Expression<Func<T, TField>> fieldExpression)
Parameters
fieldExpressionExpression<Func<T, TField>>The field to exclude from the projection.
Returns
- ExclusiveProjectionBuilder<T>
The projection builder.
Type Parameters
TFieldThe type of the field to exclude.
IncludeSpecial(string)
Specify a special field to include in the projection.
public ExclusiveProjectionBuilder<T> IncludeSpecial(string fieldName)
Parameters
fieldNamestringThe name of the field to include.
Returns
- ExclusiveProjectionBuilder<T>
The projection builder.
IncludeSpecial<TField>(Expression<Func<T, TField>>)
Specify a special field to include in the projection.
public ExclusiveProjectionBuilder<T> IncludeSpecial<TField>(Expression<Func<T, TField>> fieldExpression)
Parameters
fieldExpressionExpression<Func<T, TField>>
Returns
- ExclusiveProjectionBuilder<T>
The projection builder.
Type Parameters
TField
Slice(string, int, int)
Specify a field to include in the projection.
public ExclusiveProjectionBuilder<T> Slice(string fieldName, int start, int length = 0)
Parameters
Returns
- ExclusiveProjectionBuilder<T>
The projection builder.
Slice<TField>(Expression<Func<T, TField>>, int, int)
Specify a field to include in the projection.
public ExclusiveProjectionBuilder<T> Slice<TField>(Expression<Func<T, TField>> fieldExpression, int start, int length = 0)
Parameters
fieldExpressionExpression<Func<T, TField>>The field to include in the projection.
startintlengthint
Returns
- ExclusiveProjectionBuilder<T>
The projection builder.
Type Parameters
TFieldThe type of the field to include.