private RuleChainBuilder <TObject, TSelectorResult> CreateChainBuilder <TSelectorResult>( Func <TObject, TSelectorResult> selector) { ruleChainBuilder = new RuleChainBuilder <TObject, TSelectorResult>(selector, ruleChainBuilder?.RuleChain); RuleChain = ruleChainBuilder.RuleChain; return((RuleChainBuilder <TObject, TSelectorResult>)ruleChainBuilder); }
private RuleChainBuilder <TObject, TSelectorResult, TError> CreateChainBuilder <TSelectorResult>( Func <TObject, TSelectorResult> selector) { var builder = new RuleChainBuilder <TObject, TSelectorResult, TError>(selector); if (chainOfChains == null) { chainOfChains = new RuleChain <TObject, TError>(); } chainOfChains.AddNode(builder.RuleChain); ruleChainBuilder = builder; return(builder); }