C# Class IrcDotNet.Ctcp.CtcpClient

Mostrar archivo Open project: IrcDotNet/IrcDotNet Class Usage Examples

Public Methods

Method Description
CheckErrorOccurred ( IIrcMessageTarget user ) : void

Asks the specified user whether an error just occurred.

CheckErrorOccurred ( IList users ) : void

Asks the specified list of users whether an error just occurred.

CtcpClient ( IrcClient ircClient ) : System

Initializes a new instance of the CtcpClient class.

GetTime ( IIrcMessageTarget user ) : void

Gets the local date/time of the specified user.

GetTime ( IList users ) : void

Gets the local date/time of the specified list of users.

GetVersion ( IIrcMessageTarget user ) : void

Gets the client version of the specified user.

GetVersion ( IList users ) : void

Gets the client version of the specified list of users.

Ping ( IIrcMessageTarget user ) : void

Pings the specified user.

Ping ( IList users ) : void

Pings the specified list of users.

SendAction ( IIrcMessageTarget user, string text ) : void

Sends an action message to the specified list of users.

SendAction ( IList users, string text ) : void

Sends an action message to the specified list of users.

ToString ( ) : string

Returns a string representation of this instance.

Protected Methods

Method Description
OnActionReceived ( CtcpMessageEventArgs e ) : void

Raises the ActionReceived event.

OnActionSent ( CtcpMessageEventArgs e ) : void

Raises the ActionSent event.

OnError ( IrcErrorEventArgs e ) : void

Raises the Error event.

OnErrorMessageResponseReceived ( CtcpErrorMessageReceivedEventArgs e ) : void

Raises the ErrorMessageReceived event.

OnPingResponseReceived ( CtcpPingResponseReceivedEventArgs e ) : void

Raises the PingResponseReceived event.

OnRawMessageReceived ( CtcpRawMessageEventArgs e ) : void

Raises the RawMessageReceived event.

OnRawMessageSent ( CtcpRawMessageEventArgs e ) : void

Raises the RawMessageSent event.

OnTimeResponseReceived ( CtcpTimeResponseReceivedEventArgs e ) : void

Raises the TimeResponseReceived event.

OnVersionResponseReceived ( CtcpVersionResponseReceivedEventArgs e ) : void

Raises the VersionResponseReceived event.

SendMessageAction ( IList targets, string text ) : void

Sends an action message to the specified target.

SendMessageErrMsg ( IList targets, string tag, bool isResponse ) : void

Sends a request for confirming that no error has occurred.

SendMessagePing ( IList targets, string info, bool isResponse ) : void

Sends a ping request or response to the specified target.

SendMessageTime ( IList targets, string info, bool isResponse ) : void

Sends a request for the local date/time to the specified target.

SendMessageVersion ( IList targets, string info, bool isResponse ) : void

Sends a request or response for information about the version of the client.

WriteMessage ( IList targets, CtcpMessage message ) : void
WriteMessage ( IList targets, string tag, string data = null, bool isResponse = false ) : void

Private Methods

Method Description
CtcpDequote ( string value ) : string
CtcpQuote ( string value ) : string
InitializeMessageProcessors ( ) : void
LowLevelDequote ( string value ) : string
LowLevelQuote ( string value ) : string
ProcessMessageAction ( CtcpMessage message ) : void
ProcessMessageErrMsg ( CtcpMessage message ) : void
ProcessMessagePing ( CtcpMessage message ) : void
ProcessMessageTime ( CtcpMessage message ) : void
ProcessMessageVersion ( CtcpMessage message ) : void
ReadMessage ( CtcpMessage message ) : void
ReadMessage ( IrcPreviewMessageEventArgs previewMessageEventArgs, bool isNotice ) : void
WriteMessage ( IList targets, string taggedData, bool isResponse ) : void

Writes the specified message to a target.

ircClient_Connected ( object sender, EventArgs e ) : void
ircClient_Disconnected ( object sender, EventArgs e ) : void
ircClient_LocalUser_PreviewMessageReceived ( object sender, IrcPreviewMessageEventArgs e ) : void
ircClient_LocalUser_PreviewNoticeReceived ( object sender, IrcPreviewMessageEventArgs e ) : void

Method Details

CheckErrorOccurred() public method

Asks the specified user whether an error just occurred.
public CheckErrorOccurred ( IIrcMessageTarget user ) : void
user IIrcMessageTarget The user to which to send the request.
return void

CheckErrorOccurred() public method

Asks the specified list of users whether an error just occurred.
public CheckErrorOccurred ( IList users ) : void
users IList A list of users to which to send the request.
return void

CtcpClient() public method

Initializes a new instance of the CtcpClient class.
public CtcpClient ( IrcClient ircClient ) : System
ircClient IrcClient The IRC client by which the CTCP client should communicate.
return System

GetTime() public method

Gets the local date/time of the specified user.
public GetTime ( IIrcMessageTarget user ) : void
user IIrcMessageTarget The user to which to send the request.
return void

GetTime() public method

Gets the local date/time of the specified list of users.
public GetTime ( IList users ) : void
users IList A list of users to which to send the request.
return void

GetVersion() public method

Gets the client version of the specified user.
public GetVersion ( IIrcMessageTarget user ) : void
user IIrcMessageTarget The user to which to send the request.
return void

GetVersion() public method

Gets the client version of the specified list of users.
public GetVersion ( IList users ) : void
users IList A list of users to which to send the request.
return void

OnActionReceived() protected method

Raises the ActionReceived event.
protected OnActionReceived ( CtcpMessageEventArgs e ) : void
e CtcpMessageEventArgs The instance containing the event data.
return void

OnActionSent() protected method

Raises the ActionSent event.
protected OnActionSent ( CtcpMessageEventArgs e ) : void
e CtcpMessageEventArgs The instance containing the event data.
return void

OnError() protected method

Raises the Error event.
protected OnError ( IrcErrorEventArgs e ) : void
e IrcErrorEventArgs The instance containing the event data.
return void

OnErrorMessageResponseReceived() protected method

Raises the ErrorMessageReceived event.
protected OnErrorMessageResponseReceived ( CtcpErrorMessageReceivedEventArgs e ) : void
e CtcpErrorMessageReceivedEventArgs /// The instance containing the event /// data. ///
return void

OnPingResponseReceived() protected method

Raises the PingResponseReceived event.
protected OnPingResponseReceived ( CtcpPingResponseReceivedEventArgs e ) : void
e CtcpPingResponseReceivedEventArgs /// The instance containing the event data. ///
return void

OnRawMessageReceived() protected method

Raises the RawMessageReceived event.
protected OnRawMessageReceived ( CtcpRawMessageEventArgs e ) : void
e CtcpRawMessageEventArgs The instance containing the event data.
return void

OnRawMessageSent() protected method

Raises the RawMessageSent event.
protected OnRawMessageSent ( CtcpRawMessageEventArgs e ) : void
e CtcpRawMessageEventArgs The instance containing the event data.
return void

OnTimeResponseReceived() protected method

Raises the TimeResponseReceived event.
protected OnTimeResponseReceived ( CtcpTimeResponseReceivedEventArgs e ) : void
e CtcpTimeResponseReceivedEventArgs /// The instance containing the event data. ///
return void

OnVersionResponseReceived() protected method

Raises the VersionResponseReceived event.
protected OnVersionResponseReceived ( CtcpVersionResponseReceivedEventArgs e ) : void
e CtcpVersionResponseReceivedEventArgs /// The instance containing the event data. ///
return void

Ping() public method

Pings the specified user.
public Ping ( IIrcMessageTarget user ) : void
user IIrcMessageTarget The user to which to send the request.
return void

Ping() public method

Pings the specified list of users.
public Ping ( IList users ) : void
users IList A list of users to which to send the request.
return void

SendAction() public method

Sends an action message to the specified list of users.
public SendAction ( IIrcMessageTarget user, string text ) : void
user IIrcMessageTarget The user to which to send the request.
text string
return void

SendAction() public method

Sends an action message to the specified list of users.
public SendAction ( IList users, string text ) : void
users IList A list of users to which to send the request.
text string The text of the message.
return void

SendMessageAction() protected method

Sends an action message to the specified target.
protected SendMessageAction ( IList targets, string text ) : void
targets IList A list of the targets of the message.
text string The message text.
return void

SendMessageErrMsg() protected method

Sends a request for confirming that no error has occurred.
protected SendMessageErrMsg ( IList targets, string tag, bool isResponse ) : void
targets IList A list of the targets of the message.
tag string A tag that can be used for tracking the response.
isResponse bool /// if the message is a response; , /// otherwise. ///
return void

SendMessagePing() protected method

Sends a ping request or response to the specified target.
protected SendMessagePing ( IList targets, string info, bool isResponse ) : void
targets IList A list of the targets of the message.
info string The information to send.
isResponse bool /// if the message is a response; , /// otherwise. ///
return void

SendMessageTime() protected method

Sends a request for the local date/time to the specified target.
protected SendMessageTime ( IList targets, string info, bool isResponse ) : void
targets IList A list of the targets of the message.
info string The information to send.
isResponse bool /// if the message is a response; , /// otherwise. ///
return void

SendMessageVersion() protected method

Sends a request or response for information about the version of the client.
protected SendMessageVersion ( IList targets, string info, bool isResponse ) : void
targets IList A list of the targets of the message.
info string The information to send.
isResponse bool /// if the message is a response; , /// otherwise. ///
return void

ToString() public method

Returns a string representation of this instance.
public ToString ( ) : string
return string

WriteMessage() protected method

/// contains more than 15 many parameters. /// /// The value of of /// is invalid. ///
protected WriteMessage ( IList targets, CtcpMessage message ) : void
targets IList
message CtcpMessage The message to write.
return void

WriteMessage() protected method

protected WriteMessage ( IList targets, string tag, string data = null, bool isResponse = false ) : void
targets IList
tag string The tag of the message.
data string The data contained by the message.
isResponse bool /// if the message is a response to another message; /// , otherwise. ///
return void