问题:
类构造函数如下:
public class ParsingRulesProvider : IParsingRulesProvider{
public ParsingRulesProvider(List<IParsingRule> rules){}
}
我们有两个规则:
public class ARule : IParsingRule{
public ARule(IASomeObject someObject){}
}
public class BRule : IParsingRule{
public BRule(IBSomeObject someObject){}
}
问题:
代码注册方法:
ParsingRulesProvider
与规则 A 和 B?ParsingRulesProvider
与所有实现IParsingRule 的对象?ARule
和BRule
?