logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class StructuredTrim

    Instructs a store to keep only the best KeepCount records — in Ordering order — among the records matching ScopeFilters, discarding the rest. A literal per-record cap, applied within the given scope only.

    Inheritance
    object
    StructuredTrim
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Persistence.Domain.ValueObjects
    Assembly: Serenity.Global.Domain.dll
    Syntax
    public sealed class StructuredTrim

    Constructors

    StructuredTrim(IReadOnlyList<FieldFilter>, IReadOnlyList<OrderField>, int)

    Creates a new StructuredTrim.

    Declaration
    public StructuredTrim(IReadOnlyList<FieldFilter> scopeFilters, IReadOnlyList<OrderField> ordering, int keepCount)
    Parameters
    Type Name Description
    IReadOnlyList<FieldFilter> scopeFilters
    IReadOnlyList<OrderField> ordering
    int keepCount

    Properties

    KeepCount

    The number of records to keep within the scope.

    Declaration
    public int KeepCount { get; }
    Property Value
    Type Description
    int

    Ordering

    Ordering used to decide which records are "best" and therefore kept.

    Declaration
    public IReadOnlyList<OrderField> Ordering { get; }
    Property Value
    Type Description
    IReadOnlyList<OrderField>

    ScopeFilters

    Predicates ANDed together to scope which records the trim considers.

    Declaration
    public IReadOnlyList<FieldFilter> ScopeFilters { get; }
    Property Value
    Type Description
    IReadOnlyList<FieldFilter>
    In this article
    © 2026 Serenity. All Rights Reserved