c# - Servicestack - Order of operation Fluent Validation and Request Filters -
we have few request filters , utilise validation feature.
[attributeusage(attributetargets.method, inherited = true)] public class myfilterattribute : attribute, ihasrequestfilter { ... }
in apphost:
public override void configure(container container) { .... plugins.add(new validationfeature()); .... }
i need fluent validation run after request filters, filters add data dto validated. have seen order of operations doesn't validation fits in...at least didn't see.
any appreciated.
the validationfeature things in servicestack simple plugin source code can found going servicestack github repo pressing 't' activate github's find files feature , start typing in parts of class name, e.g vfe
bring validationfeature first result.
inside validationfeature can see in iplugin.register(iapphost)
feature how works:
public void register(iapphost apphost) { if(!apphost.requestfilters.contains(validationfilters.requestfilter)) apphost.requestfilters.add(validationfilters.requestfilter); }
which seen above registers global request filter. order of operations points out global request filters executed after filter attributes priority <0
, before filter attributes priority >=0
.
Comments
Post a Comment