Class InterceptGroup
Defines a set of related intercept handlers.
public sealed class InterceptGroup : IReadOnlyList<InterceptHandler>, IReadOnlyCollection<InterceptHandler>, IEnumerable<InterceptHandler>, IEnumerable
- Inheritance
-
InterceptGroup
- Implements
Constructors
InterceptGroup()
Constructs a new empty intercept group.
public InterceptGroup()
InterceptGroup(ReadOnlySpan<InterceptHandler>)
Constructs a new intercept group with the specified handlers.
public InterceptGroup(ReadOnlySpan<InterceptHandler> handlers)
Parameters
handlers
ReadOnlySpan<InterceptHandler>
Properties
Count
Gets the number of elements in the collection.
public int Count { get; }
Property Value
- int
The number of elements in the collection.
this[int]
Gets the element at the specified index in the read-only list.
public InterceptHandler this[int index] { get; }
Parameters
index
intThe zero-based index of the element to get.
Property Value
- InterceptHandler
The element at the specified index in the read-only list.
Persistent
Whether this is a persistent intercept group.
public bool Persistent { get; set; }
Property Value
Remarks
Persistent intercept groups can be attached before a connection is established when message information is not yet available. They will be persisted by a message dispatcher and re-attached each time the game connects, until the registration returned by Register(InterceptGroup) is disposed of.
Methods
Add(InterceptHandler)
Adds the specified handler to the intercept group.
public void Add(InterceptHandler handler)
Parameters
handler
InterceptHandler