C# Class Mycroft.App.MessageEventHandler

The Message Event Handler class. Manages all the events for a mycroft client.
Exibir arquivo Open project: rit-sse-mycroft/app-text-to-speech Class Usage Examples

Public Methods

Method Description
Handle ( string msgType, dynamic data = null ) : void

Handles an event of a given type

MessageEventHandler ( ) : System

Constructor for MessageEventhandler

On ( string msgType, ConnectDisconnect del ) : void

Adds a ConnectDisconnect Handler

On ( string msgType, MsgHandler del ) : void

Adds a Message Handler

Method Details

Handle() public method

Handles an event of a given type
public Handle ( string msgType, dynamic data = null ) : void
msgType string The message type
data dynamic The date to be passed to the handler
return void

MessageEventHandler() public method

Constructor for MessageEventhandler
public MessageEventHandler ( ) : System
return System

On() public method

Adds a ConnectDisconnect Handler
public On ( string msgType, ConnectDisconnect del ) : void
msgType string The type of message that this should be added to
del ConnectDisconnect The delegate method handling the event
return void

On() public method

Adds a Message Handler
public On ( string msgType, MsgHandler del ) : void
msgType string The type of message this should be added to
del MsgHandler The delegate method handling the event
return void