Design Pattern Examples
Overview of object-oriented design patterns
IMessageHandler Interface Reference

Represents a handler in a chain of handlers. All objects that participate in the HandlerChain class must implement this interface. More...

Inheritance diagram for IMessageHandler:
Inheritance graph
Collaboration diagram for IMessageHandler:
Collaboration graph

Public Member Functions

bool ProcessMessage (Message message)
 Called with a message on each window.
 
string ToString ()
 Convert the handler to a string.
 

Properties

int ID [get]
 ID of the window. This is used to uniquely identify a window in the collection.
 

Detailed Description

Represents a handler in a chain of handlers. All objects that participate in the HandlerChain class must implement this interface.

Definition at line 18 of file HandlerChain_Class.cs.

Member Function Documentation

◆ ProcessMessage()

bool ProcessMessage ( Message  message)

Called with a message on each window.

Parameters
messageMessage object representing the message to process.
Returns
Returns true if the message was processed and the message should not be passed to subsequent windows. Returns false to indicate the message should be passed to subsequent windows.

Implemented in MessageWindow.

Referenced by HandlerChain.SendMessage().

◆ ToString()

string ToString ( )

Convert the handler to a string.

Returns
Returns a representation of the handler.

Implemented in MessageWindow.

Referenced by HandlerChain.ToString().

Property Documentation

◆ ID

int ID
get

ID of the window. This is used to uniquely identify a window in the collection.

Implemented in MessageWindow.

Definition at line 24 of file HandlerChain_Class.cs.

Referenced by HandlerChain.AddHandler(), HandlerChain.RemoveHandler(), and MessageWindow.ToString().


The documentation for this interface was generated from the following file: