Class MvcHandler
Handles MVC-related requests
Inheritance
System.Object
MvcHandler
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)
Namespace: Azos.Wave.Handlers
Assembly: Azos.Wave.dll
Syntax
public class MvcHandler : TypeLookupHandler<Controller>, IDisposable, IApplicationComponent, INamed, IOrdered
Constructors
MvcHandler(WorkDispatcher, IConfigSectionNode)
Declaration
protected MvcHandler(WorkDispatcher dispatcher, IConfigSectionNode confNode)
Parameters
Type | Name | Description |
---|---|---|
WorkDispatcher | dispatcher | |
IConfigSectionNode | confNode |
MvcHandler(WorkDispatcher, String, Int32, WorkMatch)
Declaration
protected MvcHandler(WorkDispatcher dispatcher, string name, int order, WorkMatch match)
Parameters
Type | Name | Description |
---|---|---|
WorkDispatcher | dispatcher | |
System.String | name | |
System.Int32 | order | |
WorkMatch | match |
Methods
BindParameters(Controller, String, ActionAttribute, MethodInfo, WorkContext, out Object[])
Fills method invocation param array with args doing some interpretation for widely used types like JSONDataMaps, Rows etc..
Declaration
protected virtual void BindParameters(Controller controller, string action, ActionAttribute attrAction, MethodInfo method, WorkContext work, out object[] args)
Parameters
Type | Name | Description |
---|---|---|
Controller | controller | |
System.String | action | |
ActionAttribute | attrAction | |
System.Reflection.MethodInfo | method | |
WorkContext | work | |
System.Object[] | args |
DoError(WorkContext, Exception)
Handles the error by re-throwing MVCException with wrapped inner exception. This method must NOT include any stack trace as text because it indicates system problems. Use Debug log destination (which prints inner stack traces) if more details are needed
Declaration
protected override void DoError(WorkContext work, Exception error)
Parameters
Type | Name | Description |
---|---|---|
WorkContext | work | |
System.Exception | error |
Overrides
Azos.Wave.Handlers.TypeLookupHandler<Azos.Wave.Mvc.Controller>.DoError(Azos.Wave.WorkContext, System.Exception)
DoTargetWork(Controller, WorkContext)
Declaration
protected override void DoTargetWork(Controller target, WorkContext work)
Parameters
Type | Name | Description |
---|---|---|
Controller | target | |
WorkContext | work |
Overrides
Azos.Wave.Handlers.TypeLookupHandler<Azos.Wave.Mvc.Controller>.DoTargetWork(Azos.Wave.Mvc.Controller, Azos.Wave.WorkContext)
FindMatchingAction(Controller, WorkContext, String, out Object[])
Finds matching method that has the specified action name and best matches the supplied input
Declaration
protected virtual MethodInfo FindMatchingAction(Controller controller, WorkContext work, string action, out object[] args)
Parameters
Type | Name | Description |
---|---|---|
Controller | controller | |
WorkContext | work | |
System.String | action | |
System.Object[] | args |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo |
GetActionName(Controller, WorkContext)
Gets name of MVC action from work and controller. Controller may override name of variable
Declaration
protected virtual string GetActionName(Controller controller, WorkContext work)
Parameters
Type | Name | Description |
---|---|---|
Controller | controller | |
WorkContext | work |
Returns
Type | Description |
---|---|
System.String |
ProcessResult(Controller, WorkContext, Object)
Turns result object into appropriate response
Declaration
protected virtual void ProcessResult(Controller controller, WorkContext work, object result)
Parameters
Type | Name | Description |
---|---|---|
Controller | controller | |
WorkContext | work | |
System.Object | result |
Implements
System.IDisposable