Table of Contents

Class ViewingGroupFilter

Namespace
EncDotNet.S100.Pipelines.Vector
Assembly
EncDotNet.S100.Core.dll

A per-dataset narrowing of viewing-group visibility, applied on top of the map-wide display mode and the per-product hidden viewing groups.

public sealed class ViewingGroupFilter : IEquatable<ViewingGroupFilter>
Inheritance
ViewingGroupFilter
Implements
Inherited Members

Remarks

A filter can only hide more: a viewing group that the display mode or the per-product settings already hide stays hidden. Use ShowOnly(IEnumerable<int>) to keep a few groups of one dataset (for example the action points of an S-421 route while a planning tool draws its legs) and Hide(IEnumerable<int>) to drop a few.

Filters compare by value, so a host can skip a re-render when an equal filter is set again.

Properties

Hidden

Viewing groups the dataset doesn't draw.

public IReadOnlySet<int> Hidden { get; }

Property Value

IReadOnlySet<int>

ShownOnly

The only viewing groups the dataset may draw, or null when the filter doesn't restrict the dataset to a set.

public IReadOnlySet<int>? ShownOnly { get; }

Property Value

IReadOnlySet<int>

Methods

Allows(int)

Whether the filter lets viewingGroup draw.

public bool Allows(int viewingGroup)

Parameters

viewingGroup int

A viewing group id.

Returns

bool

true when the group isn't filtered out.

Equals(ViewingGroupFilter?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ViewingGroupFilter? other)

Parameters

other ViewingGroupFilter

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Hide(IEnumerable<int>)

Creates a filter that hides viewingGroups.

public static ViewingGroupFilter Hide(IEnumerable<int> viewingGroups)

Parameters

viewingGroups IEnumerable<int>

The viewing groups to hide.

Returns

ViewingGroupFilter

The filter.

Exceptions

ArgumentNullException

viewingGroups is null.

ShowOnly(IEnumerable<int>)

Creates a filter that draws only viewingGroups.

public static ViewingGroupFilter ShowOnly(IEnumerable<int> viewingGroups)

Parameters

viewingGroups IEnumerable<int>

The viewing groups to keep.

Returns

ViewingGroupFilter

The filter.

Exceptions

ArgumentNullException

viewingGroups is null.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.