Table of Contents

Struct Intercept<TMsg>

Namespace
Xabbo
Assembly
Xabbo.Common.dll

Contains the event arguments of an intercepted message.

public ref struct Intercept<TMsg> where TMsg : IMessage<TMsg>

Type Parameters

TMsg

The type of the message.

Inherited Members

Constructors

Intercept(ref Intercept)

Contains the event arguments of an intercepted message.

public Intercept(ref Intercept inner)

Parameters

inner Intercept

The inner intercept instance to wrap.

Properties

Direction

Gets the direction of the message.

public readonly Direction Direction { get; }

Property Value

Direction

Interceptor

Gets the interceptor that intercepted this message.

public readonly IInterceptor Interceptor { get; }

Property Value

IInterceptor

IsBlocked

Gets whether the packet will be blocked by the interceptor.

public readonly bool IsBlocked { get; }

Property Value

bool

Msg

Gets the parsed message for this intercept.

public TMsg Msg { get; }

Property Value

TMsg

Sequence

Gets the sequence number of the intercepted message.

public readonly int Sequence { get; }

Property Value

int

Timestamp

Gets the time that the message was intercepted.

public readonly DateTime Timestamp { get; }

Property Value

DateTime

Methods

Block()

Flags the packet to be blocked from its destination by the interceptor.

public readonly void Block()

Is(ReadOnlySpan<Identifier>)

Gets whether the intercepted packet's unmodified header matches any of the specified identifiers.

public readonly bool Is(ReadOnlySpan<Identifier> identifiers)

Parameters

identifiers ReadOnlySpan<Identifier>

Returns

bool

Wrap(InterceptCallback<TMsg>)

Wraps the targeted message intercept callback.

public static InterceptCallback Wrap(InterceptCallback<TMsg> callback)

Parameters

callback InterceptCallback<TMsg>

Returns

InterceptCallback