Class InterceptHandler
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
InterceptCallbackThe 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
InterceptCallbackThe intercept handler callback.
Properties
Callback
Gets the intercept handler callback.
public InterceptCallback Callback { get; }
Property Value
Headers
Gets the target headers.
public ReadOnlySpan<Header> Headers { get; }
Property Value
Identifiers
Gets the target identifiers.
public ReadOnlySpan<Identifier> Identifiers { get; }
Property Value
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
UseTargetedIdentifiers
Whether to use client-targeted identifiers.
public bool UseTargetedIdentifiers { get; set; }
Property Value
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.