Hi
I've been using NetTiers for a few months now and I think I've got to grips with things but I'm not completely clear on the use of processors.
It appears to me that the example processor on the NetTiers site (Documentation/Component Layer) will only display the first error it comes across, as the InventoryRuleCheck method returns when it finds an order for a product with insufficient stock i.e. you get one error per rule. What if there were subsequent orders for products with insufficient stock?
In my project, I want to display all validation failures so that the user is aware there are many problems, not just one. I also want general validation, not just on one property ValidationRuleArgs expects e.g. I want to check that the users have entered all necessary data which may consist of 3 fields in 5 records. It probably doesn't matter if I leave the property name as string.Empty, but I feel like I'm misusing the feature.
Am I barking up the wrong tree or is this a valid comment? Is there any way of using processors to return all errors, or will I have to write custom validation code?
Also, I noticed that using the example gives me a memory leak in my asp.net app. When I get the Product, it remembers the validation rules (I don't know how, as far as I'm concerned it's a new object!), so when I call service.Execute() the Process method adds the validation rules again, so the array just gets bigger and bigger everytime you go back to/refresh the page! Any ideas anyone??
Thanks, Martin.