Table of Contents

Class InterceptHandler

Namespace
Xabbo.Messages
Assembly
Xabbo.Common.dll

Associates a set of Identifier and/or Header with an InterceptCallback.

public sealed class InterceptHandler
Inheritance
InterceptHandler

Constructors

InterceptHandler(ReadOnlySpan<Header>, ReadOnlySpan<Identifier>, InterceptCallback)

Associates a set of Identifier and/or Header with an InterceptCallback.

public InterceptHandler(ReadOnlySpan<Header> headers, ReadOnlySpan<Identifier> identifiers, InterceptCallback callback)

Parameters

headers ReadOnlySpan<Header>
identifiers ReadOnlySpan<Identifier>
callback InterceptCallback

InterceptHandler(ReadOnlySpan<Header>, InterceptCallback)

Constructs a new intercept handler with the specified headers and callback.

public InterceptHandler(ReadOnlySpan<Header> headers, InterceptCallback callback)

Parameters

headers ReadOnlySpan<Header>

The headers to intercept.

callback InterceptCallback

The intercept handler callback.

InterceptHandler(ReadOnlySpan<Identifier>, InterceptCallback)

Constructs a new intercept handler with the specified identifiers and callback.

public InterceptHandler(ReadOnlySpan<Identifier> identifiers, InterceptCallback callback)

Parameters

identifiers ReadOnlySpan<Identifier>

The identifiers to intercept.

callback InterceptCallback

The intercept handler callback.

Properties

Callback

Gets the intercept handler callback.

public InterceptCallback Callback { get; }

Property Value

InterceptCallback

Headers

Gets the target headers.

public ReadOnlySpan<Header> Headers { get; }

Property Value

ReadOnlySpan<Header>

Identifiers

Gets the target identifiers.

public ReadOnlySpan<Identifier> Identifiers { get; }

Property Value

ReadOnlySpan<Identifier>

Target

Specifies which clients this handler should be registered for. The handler will only be attached on the specified client sessions.

public ClientType Target { get; init; }

Property Value

ClientType

UseTargetedIdentifiers

Whether to use client-targeted identifiers.

public bool UseTargetedIdentifiers { get; set; }

Property Value

bool

Remarks

Targeted identifiers will only intercept messages for the their specified client. For example, a Flash identifier will only intercept messages for the Flash client.