Class Controller
Represents controller from which all Mvc controllers inherit
Inheritance
System.Object
Controller
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.Wave.dll
Syntax
public abstract class Controller : DisposableObject, IDisposable
Fields
DEFAULT_MVC_ACTION
Declaration
public const string DEFAULT_MVC_ACTION = "index"
Field Value
Type |
Description |
System.String |
|
DEFAULT_VAR_MVC_ACTION
Declaration
public const string DEFAULT_VAR_MVC_ACTION = "mvc-action"
Field Value
Type |
Description |
System.String |
|
Properties
ActionVarName
Declaration
public virtual string ActionVarName { get; }
Property Value
Type |
Description |
System.String |
|
App
Returns current application context
Declaration
public IApplication App { get; }
Property Value
DefaultActionName
Declaration
public virtual string DefaultActionName { get; }
Property Value
Type |
Description |
System.String |
|
WorkContext
Returns current work context
Declaration
public WorkContext WorkContext { get; }
Property Value
Methods
ActionInvocationFinally(WorkContext, String, MethodInfo, Object[], Object)
Override to add logic/filtering finally after the invocation of action method
Declaration
protected virtual void ActionInvocationFinally(WorkContext work, string action, MethodInfo method, object[] args, object result)
Parameters
Type |
Name |
Description |
WorkContext |
work |
|
System.String |
action |
|
System.Reflection.MethodInfo |
method |
|
System.Object[] |
args |
|
System.Object |
result |
|
AfterActionInvocation(WorkContext, String, MethodInfo, Object[], Object)
Override to add logic/filtering right after the invocation of action method. Must return the result (which can be altered/filtered).
The default implementation calls ActionFilters
Declaration
protected virtual object AfterActionInvocation(WorkContext work, string action, MethodInfo method, object[] args, object result)
Parameters
Type |
Name |
Description |
WorkContext |
work |
|
System.String |
action |
|
System.Reflection.MethodInfo |
method |
|
System.Object[] |
args |
|
System.Object |
result |
|
Returns
Type |
Description |
System.Object |
|
BeforeActionInvocation(WorkContext, String, MethodInfo, Object[], ref Object)
Override to add logic/filtering right before the invocation of action method.
Return TRUE to indicate that request has already been handled and no need to call method body and AfterActionInvocation in which case
return result via 'out result' paremeter.
The default implementation calls ActionFilters
Declaration
protected virtual bool BeforeActionInvocation(WorkContext work, string action, MethodInfo method, object[] args, ref object result)
Parameters
Type |
Name |
Description |
WorkContext |
work |
|
System.String |
action |
|
System.Reflection.MethodInfo |
method |
|
System.Object[] |
args |
|
System.Object |
result |
|
Returns
Type |
Description |
System.Boolean |
|
FindMatchingAction(WorkContext, String, out Object[])
Override to perform custom action name + params -> MethodInfo, param array resolution.
This method rarely needs to be overridden because the framework does the resolution that suites most cases
Declaration
protected virtual MethodInfo FindMatchingAction(WorkContext work, string action, out object[] args)
Parameters
Type |
Name |
Description |
WorkContext |
work |
|
System.String |
action |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.Reflection.MethodInfo |
|
GetActionFilters(MethodInfo)
Returns cached (for performance)ordered array of ActionFilterAttributes for action method
Declaration
protected static ActionFilterAttribute[] GetActionFilters(MethodInfo mi)
Parameters
Type |
Name |
Description |
System.Reflection.MethodInfo |
mi |
|
Returns
GetActionFilters(Type)
Returns cached (for performance)ordered array of ActionFilterAttributes for type
Declaration
protected static ActionFilterAttribute[] GetActionFilters(Type tp)
Parameters
Type |
Name |
Description |
System.Type |
tp |
|
Returns
Implements
System.IDisposable
Extension Methods