C# Class Castle.MonoRail.Framework.Services.DefaultControllerTree

Default implementation of IControllerTree. Represents an binary tree of registered controllers.

It is used by the controller factory to resolve a controller instance based on the specified area (which is optional) and controller name

IControllerTree Castle.MonoRail.Framework.Services.AbstractControllerFactory
Inheritance: IControllerTree
Afficher le fichier Open project: nats/castle-1.0.3-mono Class Usage Examples

Méthodes publiques

Méthode Description
AddController ( String areaName, String controllerName, Type controller ) : void

Register a controller on the tree. If the specified area name matches the current node, the controller is register on the node itself, otherwise on the right or on the left node.

Note that the controller is an object. That allows different implementation of a controller factory to register different representation of what a controller is (a name, a descriptor etc)

DefaultControllerTree ( ) : System

Constructs a ControllerTree with an empty area

DefaultControllerTree ( String areaName ) : System

Constructs a ControllerTree specifying an area

GetController ( String areaName, String controllerName ) : Type

Returns a controller previously registered.

Method Details

AddController() public méthode

Register a controller on the tree. If the specified area name matches the current node, the controller is register on the node itself, otherwise on the right or on the left node.
Note that the controller is an object. That allows different implementation of a controller factory to register different representation of what a controller is (a name, a descriptor etc)
public AddController ( String areaName, String controllerName, Type controller ) : void
areaName String The area name, or String.Empty
controllerName String The controller name
controller System.Type The controller representation
Résultat void

DefaultControllerTree() public méthode

Constructs a ControllerTree with an empty area
public DefaultControllerTree ( ) : System
Résultat System

DefaultControllerTree() public méthode

Constructs a ControllerTree specifying an area
public DefaultControllerTree ( String areaName ) : System
areaName String
Résultat System

GetController() public méthode

Returns a controller previously registered.
public GetController ( String areaName, String controllerName ) : Type
areaName String The area name, or String.Empty
controllerName String The controller name
Résultat System.Type