Description
In order to make use of DomainParser the rule provider it consumes must be initialised by calling the Build() method or else an exception is thrown (DomainDataStructure is not available).
In order to call the Build() method in an aspnet context, some specific, non standard code needs to be executed in the startup class, which, as a side effect, requires that dependencies have to be registered as singleton. When rule providers are more advanced than the ones provided this github repo, for instance when data bases are involved, this may lead to a far from optimal setup.
Why is the Build() method not called by the DomainParser class. That is, rather than throwing an exception when _ruleProvider.GetDomainDataStructure() returns null, why not calling _ruleProvider.Build()?
I offer my help to discuss the design to see if it can be improved for more advance usage scenarios.
Activity