Table of Contents

Class MessageExtensions

Namespace
Fluxer.Net.Commands
Assembly
Fluxer.Net.dll

Provides extension methods for IMessage that relates to commands.

public static class MessageExtensions
Inheritance
object
MessageExtensions

Methods

HasCharPrefix(SocketMessage, char, ref int)

Gets whether the message starts with the provided character.

public static bool HasCharPrefix(this SocketMessage msg, char c, ref int argPos)

Parameters

msg SocketMessage

The message to check against.

c char

The char prefix.

argPos int

References where the command starts.

Returns

bool

true if the message begins with the char c; otherwise false.

HasStringPrefix(SocketMessage, string, ref int, StringComparison)

Gets whether the message starts with the provided string.

public static bool HasStringPrefix(this SocketMessage msg, string str, ref int argPos, StringComparison comparisonType = StringComparison.Ordinal)

Parameters

msg SocketMessage
str string
argPos int
comparisonType StringComparison

Returns

bool