.net - In ASP.NET MVC, how to define in which sequence my custom attributes are checked/applied? -


I am currently checking the possibility of using custom attributes derived from ActionFilterAttribute. I have two things with some features I want to make sure I want to complete that in any one random sequence, one of the first characteristics will have to be played first.

Example:

  Public class Feature1Attrubute: ActionFilterAttribute {/ * ... * ... * Public class Feature2Attrubute: ActionFilterAttribute {/ * ... *} Public Class MyController: Controller {[Feature 1, Feature 2] Public Action MyAction () {/ * ... *}}  

Is it so much that they have properties in the sequence described in the decoration Is implemented?

If not, is there a way to define a custom sequence [custom] attributes?

base class ActionFilterAttribute is the property named . Public class MyController: Controller {[Feature1 (order = 1), Feature2 (order = 2)] Public ActionCenterMayayction () {/ * ... *}}

< / Html>

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -