IMediator implementation.
More...

Public Member Functions | |
| Mediator () | |
| Mediator (string mediatorName) | |
| Constructs a new mediator with the specified name and no view component. | |
| Mediator (string mediatorName, object viewComponent) | |
| Constructs a new mediator with the specified name and view component. | |
| virtual IList< string > | ListNotificationInterests () |
List the INotification names this Mediator is interested in being notified of. | |
| virtual void | HandleNotification (INotification notification) |
Handle INotifications. | |
| virtual void | OnRegister () |
| Called by the View when the Mediator is registered. | |
| virtual void | OnRemove () |
| Called by the View when the Mediator is removed. | |
Public Attributes | |
| const string | NAME = "Mediator" |
Protected Attributes | |
| string | m_mediatorName |
| object | m_viewComponent |
| The view component being mediated. | |
Properties | |
| virtual string | MediatorName [get] |
| object | ViewComponent [get, set] |
The IMediator | |
IMediator implementation.
| PureMVC.Patterns.Mediator.Mediator | ( | ) |
Constructs a new mediator with the default name and no view component
| PureMVC.Patterns.Mediator.Mediator | ( | string | mediatorName | ) |
Constructs a new mediator with the specified name and no view component.
| mediatorName | The name of the mediator |
| PureMVC.Patterns.Mediator.Mediator | ( | string | mediatorName, | |
| object | viewComponent | |||
| ) |
Constructs a new mediator with the specified name and view component.
| mediatorName | The name of the mediator | |
| viewComponent | The view component to be mediated |
| virtual void PureMVC.Patterns.Mediator.HandleNotification | ( | INotification | notification | ) | [virtual] |
Handle INotifications.
| notification | The INotification instance to handle |
Typically this will be handled in a switch statement, with one 'case' entry per INotification the Mediator is interested in.
Implements PureMVC.Interfaces.IMediator.
| virtual IList<string> PureMVC.Patterns.Mediator.ListNotificationInterests | ( | ) | [virtual] |
List the INotification names this Mediator is interested in being notified of.
INotification names Implements PureMVC.Interfaces.IMediator.
| virtual void PureMVC.Patterns.Mediator.OnRegister | ( | ) | [virtual] |
| virtual void PureMVC.Patterns.Mediator.OnRemove | ( | ) | [virtual] |
string PureMVC.Patterns.Mediator.m_mediatorName [protected] |
The mediator name
object PureMVC.Patterns.Mediator.m_viewComponent [protected] |
The view component being mediated.
| const string PureMVC.Patterns.Mediator.NAME = "Mediator" |
virtual string PureMVC.Patterns.Mediator.MediatorName [get] |
The name of the Mediator
You should override this in your subclass
Implements PureMVC.Interfaces.IMediator.
object PureMVC.Patterns.Mediator.ViewComponent [get, set] |
The
IMediator
Additionally, an implicit getter will usually be defined in the subclass that casts the view object to a type, like this:
private System.Windows.Form.ComboBox comboBox { get { return viewComponent as ComboBox; } }
Implements PureMVC.Interfaces.IMediator.
1.5.8