New Posts New Posts RSS Feed: Naming Verifiers
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Naming Verifiers

 Post Reply Post Reply
Author
murray.bryant View Drop Down
Groupie
Groupie


Joined: 11-Jan-2012
Location: Australia
Posts: 44
Post Options Post Options   Quote murray.bryant Quote  Post ReplyReply Direct Link To This Post Topic: Naming Verifiers
    Posted: 10-Jul-2013 at 7:31pm
I have a number of verifiers in my model. A lot of which return warnings which are then logged into the database.

What I am looking to do is work out what the name of the verifier was that made the warning so that I can log it into the database.

In the Verifier Result Collection most of my errors come up not showing the original class that they are from ( Ie just saying they are delegate verifier)

Is there a way that this can be done easily? Is there a property I missed that I can set to name a custom verifier?

thanks

Murray
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2013 at 4:45pm
There's no "name" or "tag" property on the DelegateVerifier (or any Verifier) so there isn't a really easy way to do this.
 
There is additional information available from the VerifierResult that might still be useful though.  The TriggerContext will contain the instance type and trigger (property name), and the error message itself could also contain additional identifying information.    You can also subclass the DelegateProvider<T> to give your verifiers more meaningful class names.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down