C# Class IrcShark.Chatting.Irc.FlagDefinition

Represents a definition for a flag what can be set to a user or channel.
Flag definitions are not hardcoded in the IrcShark.Chatting.Irc library. Following the internet draft IRC RPL_ISUPPORT Numeric Definition (draft-brocklesby-irc-isupport-03) written by E. Brocklesby the server can define custom flags. This class represents one of this definitions made by the server. See IrcShark.Chatting.Irc.IrcStandardDefinition for more information about the ISUPPORT reply.
Datei anzeigen Open project: hapm/IrcShark Class Usage Examples

Public Methods

Method Description
FlagDefinition ( char flag, ModeArt art ) : System

Initializes a new instance of the FlagDefinition class with the given flag character and mode art.

FlagDefinition ( char flag, ModeArt art, FlagParameter parameters ) : System

Initializes a new instance of the FlagDefinition class with the given flag character, mode art and parameter definition.

FlagDefinition ( char flag, ModeArt art, FlagParameter setParams, FlagParameter unsetParams ) : System

Initializes a new instance of the FlagDefinition class with the given flag character and mode art.

IsParameter ( FlagArt art, string text ) : bool

Checks if the given parameter is valide for the given flag.

NeedsParameter ( FlagArt art ) : bool

Tests if this flag needs a parameter or not .

Because some flags only require a parameter, when they are set you have to use the art parameter to get the result for setting or unsetting the flag.

Method Details

FlagDefinition() public method

Initializes a new instance of the FlagDefinition class with the given flag character and mode art.
public FlagDefinition ( char flag, ModeArt art ) : System
flag char /// The what represents this flag. ///
art ModeArt /// The , this flag can be applied to. ///
return System

FlagDefinition() public method

Initializes a new instance of the FlagDefinition class with the given flag character, mode art and parameter definition.
public FlagDefinition ( char flag, ModeArt art, FlagParameter parameters ) : System
flag char /// The what represents this flag. ///
art ModeArt /// The , this flag can be applied to. ///
parameters FlagParameter /// The used when the flag is set or unset. ///
return System

FlagDefinition() public method

Initializes a new instance of the FlagDefinition class with the given flag character and mode art.
public FlagDefinition ( char flag, ModeArt art, FlagParameter setParams, FlagParameter unsetParams ) : System
flag char /// A . ///
art ModeArt /// A . ///
setParams FlagParameter /// The used when the flag is set. ///
unsetParams FlagParameter /// The used when the flag is unset. ///
return System

IsParameter() public method

Checks if the given parameter is valide for the given flag.
public IsParameter ( FlagArt art, string text ) : bool
art FlagArt The flag art to check for.
text string The parameter text to check.
return bool

NeedsParameter() public method

Tests if this flag needs a parameter or not .
Because some flags only require a parameter, when they are set you have to use the art parameter to get the result for setting or unsetting the flag.
public NeedsParameter ( FlagArt art ) : bool
art FlagArt /// The to check. ///
return bool