I am looking to do something like this
public class ProductBiz: BizBase<Product> {
public List<String> BrokenRules {get;set;}
// Some kind of data + biz operation implementation
}
public static class ProductBizExtensions{
public ProductBiz Rule1(this ProductBiz prodBiz)
{}
public ProductBiz Rule2(this ProductBiz prodBiz)
{}
public bool ApplyRules (this ProductBiz prodBiz, Func<ProductBiz,bool> ruleset){}
}
Then in client code use it as
productBiz.Rule1().Rule2();
productBiz.Rule2().Rule1();
OR
// create multicasted delegate of type Func<ProductBiz,bool> say rulesetDelegate
productBiz.ApplyRules(rulesetDelegate);
Just wanted to ask before i dive deep and drown.
What are the potential pitfalls with this approach???
Thanks in advance