Table of Contents

Struct Filter<T>

Namespace
MassiveDotNet
Assembly
MassiveDotNet.dll

A filter over a field that accepts both a range and set membership: an exact value, bounds, or any of several values.

public readonly struct Filter<T>

Type Parameters

T

The field's element type.

Inherited Members

Remarks

There are no factories on this type. It is built by conversion from a plain T (equality), a RangeFilter<T>, or a SetFilter<T>, so callers only ever write RangeFilter.Between(a, b) or SetFilter.AnyOf(a, b) and meet this type in signatures alone. An unset filter (default) renders nothing, exactly like a null parameter.

Operators

implicit operator Filter<T>(RangeFilter<T>)

Converts a range filter, unchanged.

public static implicit operator Filter<T>(RangeFilter<T> filter)

Parameters

filter RangeFilter<T>

The range filter.

Returns

Filter<T>

implicit operator Filter<T>(SetFilter<T>)

Converts a set filter, unchanged.

public static implicit operator Filter<T>(SetFilter<T> filter)

Parameters

filter SetFilter<T>

The set filter.

Returns

Filter<T>

implicit operator Filter<T>(T?)

Converts a value to an equality filter: field=value.

public static implicit operator Filter<T>(T? value)

Parameters

value T

The exact value to match, or null to produce an unset filter that renders nothing.

Returns

Filter<T>

Remarks

The parameter is annotated T? rather than T. For this unconstrained type parameter that is annotation-only: a reference-type T may be null, while a value-type T is unaffected -- there is no Nullable<T> wrapping. The annotation states what this operator actually does: a null reference, such as a string? ticker = null variable passed where a filter is expected, converts to an unset filter instead of throwing ArgumentNullException naming a parameter (value) the caller never wrote, matching every other optional parameter in this SDK.