Table of Contents

Struct QueryFlags

Namespace
DuetControlServer.Model
Assembly
DuetControlServer.dll

Flags parsed from a query flags string that control which properties are included in filtered results

public readonly struct QueryFlags
Inherited Members

Constructors

QueryFlags()

Flags parsed from a query flags string that control which properties are included in filtered results

public QueryFlags()

Properties

IncludeNulls

If true, include null values in the result

public bool IncludeNulls { get; init; }

Property Value

bool

IncludeObsolete

If true, include properties marked with ObsoleteAttribute

public bool IncludeObsolete { get; init; }

Property Value

bool

IncludeVerbose

If true, include properties marked with VerboseAttribute

public bool IncludeVerbose { get; init; }

Property Value

bool

LiveOnly

If true, only include properties marked with LiveAttribute

public bool LiveOnly { get; init; }

Property Value

bool

MaxDepth

Maximum recursion depth for sub-objects. Default is 99 (effectively unlimited). With 'd1' only top-level properties are returned, sub-objects become empty objects

public int MaxDepth { get; init; }

Property Value

int

StartElement

Start element index for root-level array results (used for pagination). Default is 0 (start from the beginning)

public int StartElement { get; init; }

Property Value

int

Methods

Parse(string?)

Parse a flags string into a QueryFlags instance

public static QueryFlags Parse(string? flags)

Parameters

flags string

RRF-compatible flags string

Returns

QueryFlags

Parsed query flags

ShouldInclude(PropertyInfo)

Check if a property should be included based on its attributes and these flags

public bool ShouldInclude(PropertyInfo property)

Parameters

property PropertyInfo

Property to check

Returns

bool

Whether the property should be included