Monday, April 23, 2007 4:02 PM Olaf Conijn

Some additional PIAB MatchingRules (err.. operators?)

Even though the Validation Application Block supports extensive composition of validation rules (using And and Or 'operators' and the Negated property) PIAB doesnt.

PIAB Matchingrules are always composed using an "AND" operator (Namespace is 'BusinessLogic.Actions' and Tag is 'ShouldBeAudited').
Additionally, the matchingrules themselves often contain a collection of matches that should help you to do composition such as ((Namespace is 'BusinessLogic.Actions' or 'BusinessLogic.Services') and Tag is 'ShouldBeAudited').

Fair enough, that seems pretty straightforward and allows for a fair amount of composition logic.
Though I ran in a situation a Not operator was desired. (Type is 'Foo' and not Method is 'Bar'), decided to add this and, for sake of completeness add the designtime for it (and do the same for OR and AND-operators).



I ran into this when trying to automate the creation of PIAB policies (and their matchingrules). Which probably isnt a typicial usage scenario, fair enough.

Still, if you find yourself in the need of these types of MatchingRules, feel free to re-use mine (both sourcecode and a binary copy are attached).
The binaries are compiled against an unsigned version of EntLib. Please read Tom's post on compatibility issues, before sticking those in EntLib's installation directory.


Filed under: , ,

# South African Web Developer Weekly News - 2007-04-14 to 2007-04-28

Saturday, April 28, 2007 6:07 AM by Only In South Africa .COM

Better late than never... I have combined the last 3 weeks. In the pipeline: So much is in the pipeline

# EntLibContrib, lets extend Enterprise Library *together*!

Friday, May 11, 2007 6:38 AM by ^(?:[^$]*)$ --Matches everything, captures nothing

A couple of weeks ago the "Enterprise Library Contrib" project was published on CodePlex ( www.codeplex.com/EntLibContrib