Class ActionControllerBase
Provides the base implementation for for controllers.
Inheritance
System.Object
ActionControllerBase
Implements
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public abstract class ActionControllerBase : Controller, IRenderTemplate
Constructors
ActionControllerBase()
Declaration
protected ActionControllerBase()
Properties
UnknownActionHandlers
Gets or sets the grouped list of located IUnknownActionHandlers.
Declaration
public ILookup<string, IUnknownActionHandler> UnknownActionHandlers { get; set; }
Property Value
Type | Description |
---|---|
System.Linq.ILookup<System.String, IUnknownActionHandler> |
Remarks
The list is grouped according to action name, i.e.
UnknownActionHandlers["SomeAction"]
returns a collection
of action handlers that are registered for the "SomeAction" action.
This collection is used in the HandleUnknownAction(String) method.
The setter is only used to set up a mock collection for testing purposes.
Methods
HandleUnknownAction(String)
Iterates through the registred IUnknownActionHandlers and let them try to handle the action
Declaration
protected override void HandleUnknownAction(string actionName)
Parameters
Type | Name | Description |
---|---|---|
System.String | actionName | The name of the action |
Remarks
The list of IUnknownActionHandlers are fetched via the UnknownActionHandlers property.
The first handler that returns an action handler insted of null will get it's action result executed. If no handler returns a value, the base class will throw an 404.