C# Class Yaircc.Net.IRC.Message

Represents a message received from an IRC server.
Inheritance: IAssimilable
Show file Open project: rastating/yaircc Class Usage Examples

Public Methods

Method Description
Assimilate ( object obj ) : void

Assimilate all the data stored in obj

Message ( ) : System

Initialises a new instance of the Yaircc.Net.IRC.Message class.

Message ( string command ) : System

Initialises a new instance of the Yaircc.Net.IRC.Message class.

Message ( string command, string parameters ) : System

Initialises a new instance of the Yaircc.Net.IRC.Message class.

Message ( string prefix, string command, string parameters, string trailingParameter ) : System

Initialises a new instance of the Yaircc.Net.IRC.Message class.

ParseMessage ( string message ) : Message

Parses a text based message into a Yaircc.Net.IRC.Message.

ToString ( ) : string

Outputs the message as a string.

ToString ( string format ) : string

Returns the message using the format specified.

ToString ( string format, string parameterDelimiter, bool removeFirstParameter ) : string

Returns the message using the format specified.

TryParse ( string input ) : ParseResult

Attempts to parse the input specified by the user into the Message.

Method Details

Assimilate() public method

Assimilate all the data stored in obj
public Assimilate ( object obj ) : void
obj object The object in which to assimilate data from
return void

Message() public method

Initialises a new instance of the Yaircc.Net.IRC.Message class.
public Message ( ) : System
return System

Message() public method

Initialises a new instance of the Yaircc.Net.IRC.Message class.
public Message ( string command ) : System
command string The command the message represents.
return System

Message() public method

Initialises a new instance of the Yaircc.Net.IRC.Message class.
public Message ( string command, string parameters ) : System
command string The command the message represents.
parameters string The parameters of the command.
return System

Message() public method

Initialises a new instance of the Yaircc.Net.IRC.Message class.
public Message ( string prefix, string command, string parameters, string trailingParameter ) : System
prefix string The prefix of the message.
command string The command the message represents.
parameters string The parameters of the command.
trailingParameter string The trailing parameter of the command.
return System

ParseMessage() public static method

Parses a text based message into a Yaircc.Net.IRC.Message.
public static ParseMessage ( string message ) : Message
message string A string that meets the RFC 1459 or 2812 standard.
return Message

ToString() public method

Outputs the message as a string.
public ToString ( ) : string
return string

ToString() public method

Returns the message using the format specified.
public ToString ( string format ) : string
format string The format to use. /// {0} will be replaced with all parameters separated by a . /// {1} will be replaced with the trailing parameter. /// {2} will be replaced with the prefix. /// All others parameters are sequentially accessed e.g. the first parameter would be {3}
return string

ToString() public method

Returns the message using the format specified.
public ToString ( string format, string parameterDelimiter, bool removeFirstParameter ) : string
format string The format to use. /// {0} will be replaced with all parameters separated by a . /// {1} will be replaced with the trailing parameter. /// {2} will be replaced with the prefix. /// All others parameters are sequentially accessed e.g. the first parameter would be {3}.
parameterDelimiter string The delimiter that will separate the parameter list.
removeFirstParameter bool A value that indicates whether or not to remove the first parameter from the input.
return string

TryParse() public method

Attempts to parse the input specified by the user into the Message.
public TryParse ( string input ) : ParseResult
input string The input from the user.
return ParseResult