Controller
A Multiton IController implementation.
Inheritance
ObjectController
Namespace: PureMVC.CoreAssembly: PureMVC in (PureMVC.dll)
Syntax
C#
public class Controller: IController
Remarks
In PureMVC, the Controller class follows the 'Command and Controller' strategy, and assumes these responsibilities:
- Remembering which ICommands are intended to handle which INotifications.
- Registering itself as an IObserver with the View for each INotification that it has an ICommand mapping for.
- Creating a new instance of the proper ICommand to handle a given INotification when notified by the View.
- Calling the ICommand's execute method, passing in the INotification.
Your application must register ICommands with the Controller.
The simplest way is to subclass Facade, and use its initializeController method to add your registrations.
Constructors
Constructs and initializes a new controller
Methods
If an ICommand has previously been registered to handle a the given INotification, then it is executed.
Controller Multiton Factory method.
Check if a Command is registered for a given Notification
Initialize the Multiton Controller instance
Register a particular ICommand class as the handler for a particular INotification.
Remove a previously registered ICommand to INotification mapping.
Remove an IController instance
Fields
Mapping of Notification names to Command Class references
The Multiton Controller instanceMap.
Message Constants
The Multiton Key for this Core
Local reference to View