How to get controllers and actions attributes without using reflection #522

Open
opened 2016-10-22 11:51:52 -05:00 by weedkiller · 0 comments
weedkiller commented 2016-10-22 11:51:52 -05:00 (Migrated from github.com)

hello, how can I get all controller/action filters and attributes without using reflection.

for e.g. I want to parse and get similar results from NRefactory

public void OnActionExecuting(ActionExecutingContext c) 
     // how can I do something similar in Nrefactory
     {
       var controllerActionDes = c.ActionDescriptor as ControllerActionDescriptor;
       if (controllerActionDescriptor != null)
        {
        var actionAttributes = controllerActionDes .MethodInfo...
        }
     }
hello, how can I get all controller/action filters and attributes _without using reflection_. for e.g. I want to parse and get similar results from NRefactory ``` public void OnActionExecuting(ActionExecutingContext c) // how can I do something similar in Nrefactory { var controllerActionDes = c.ActionDescriptor as ControllerActionDescriptor; if (controllerActionDescriptor != null) { var actionAttributes = controllerActionDes .MethodInfo... } } ```
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/NRefactory#522
No description provided.