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: NFX.Wave.Handlers
Assembly: NFX.Wave.dll
Syntax
public class MVCHandler : TypeLookupHandler<Controller>, IApplicationComponent, IDisposable, 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
NFX.Wave.Handlers.TypeLookupHandler<NFX.Wave.MVC.Controller>.DoError(NFX.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
NFX.Wave.Handlers.TypeLookupHandler<NFX.Wave.MVC.Controller>.DoTargetWork(NFX.Wave.MVC.Controller, NFX.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