C# 클래스 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.
파일 보기 프로젝트 열기: hapm/IrcShark 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

FlagDefinition() 공개 메소드

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. ///
리턴 System

FlagDefinition() 공개 메소드

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. ///
리턴 System

FlagDefinition() 공개 메소드

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. ///
리턴 System

IsParameter() 공개 메소드

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.
리턴 bool

NeedsParameter() 공개 메소드

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. ///
리턴 bool