Table of Contents

Interface IMessage<TMsg>

Namespace
Xabbo.Messages
Assembly
Xabbo.Common.dll

Represents a message with an associated identifier that can be parsed from and composed to a packet.

public interface IMessage<TMsg> : IMessage, IParserComposer<TMsg>, IComposer, IParser<TMsg> where TMsg : IMessage<TMsg>

Type Parameters

TMsg
Inherited Members

Properties

Identifier

Gets the identifier for this message.

public static abstract Identifier Identifier { get; }

Property Value

Identifier

Identifiers

Gets the target identifiers for this message.

public static Identifier[] Identifiers { get; }

Property Value

Identifier[]

Remarks

The default implementation returns an array containing the single Identifier.

SupportedClients

Gets the client types that this message supports.

public static ClientType SupportedClients { get; }

Property Value

ClientType

UseTargetedIdentifiers

Gets whether each of the identifiers should only intercept on their respective client types.

public static bool UseTargetedIdentifiers { get; }

Property Value

bool

Remarks

The default implementation returns false.

Methods

CreateHandler(InterceptCallback<TMsg>)

Creates an InterceptHandler for the specified InterceptCallback<TMsg> .

public static InterceptHandler CreateHandler(InterceptCallback<TMsg> callback)

Parameters

callback InterceptCallback<TMsg>

Returns

InterceptHandler

CreateHandler(InterceptMessageCallback<TMsg>)

Creates an InterceptHandler for the specified InterceptMessageCallback<TMsg> .

public static InterceptHandler CreateHandler(InterceptMessageCallback<TMsg> callback)

Parameters

callback InterceptMessageCallback<TMsg>

Returns

InterceptHandler

CreateHandler(MessageCallback<TMsg>)

Creates an InterceptHandler for the specified MessageCallback<TMsg> .

public static InterceptHandler CreateHandler(MessageCallback<TMsg> callback)

Parameters

callback MessageCallback<TMsg>

Returns

InterceptHandler

CreateHandler(ModifyMessageCallback<TMsg>)

Creates an InterceptHandler for the specified ModifyMessageCallback<TMsg> .

public static InterceptHandler CreateHandler(ModifyMessageCallback<TMsg> callback)

Parameters

callback ModifyMessageCallback<TMsg>

Returns

InterceptHandler

Match(in PacketReader)

Checks whether the specified packet matches this message.

public static bool Match(in PacketReader p)

Parameters

p PacketReader

Returns

bool

Remarks

The default implementation returns true.