Class MessageExtensions
Provides extension methods for IMessage that relates to commands.
public static class MessageExtensions
- Inheritance
-
objectMessageExtensions
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
msgSocketMessageThe message to check against.
ccharThe char prefix.
argPosintReferences where the command starts.
Returns
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
msgSocketMessagestrstringargPosintcomparisonTypeStringComparison