Class TypeSet
- Namespace
- SpatialNET.Network
- Assembly
- SpatialNET.Network.dll
A set of type ids, the result of resolving type patterns once (ADR 0049). Searches and rules compare integers only. Immutable and thread-safe.
public sealed class TypeSetInheritance
Inherited Members
Properties
Count
The number of type ids.
public int Count { get; }Property Value
Empty
The empty set.
public static TypeSet Empty { get; }Property Value
TypeIds
The type ids, ascending.
public IReadOnlyList<int> TypeIds { get; }Property Value
Untyped
The set with only the untyped helper nodes (type 0).
public static TypeSet Untyped { get; }Property Value
Methods
Contains(int)
Whether the set contains the type id.
public bool Contains(int typeId)Parameters
typeIdint
Returns
Of(params IEnumerable<int>)
A set of the given type ids, for hosts that know the ids already.
public static TypeSet Of(params IEnumerable<int> typeIds)Parameters
typeIdsIEnumerable<int>
Returns
Exceptions
- ArgumentNullException
-
typeIdsisnull. - ArgumentOutOfRangeException
-
An id is negative.
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
A string that represents the current object.
Union(TypeSet)
The union with another set.
public TypeSet Union(TypeSet other)Parameters
otherTypeSet
Returns
Exceptions
- ArgumentNullException
-
otherisnull.