[X] I have searched issues to ensure it has not already been reported
Description
When using the built-in extensions to use the in-memory data source based on the rules stored on IServiceCollection, an ArgumentNullException is thrown. Sample bellow:
System.ArgumentNullException : Value cannot be null. (Parameter 'inMemoryRulesStorage')
Steps to reproduce
The following source code allows us to reproduce the issue:
var serviceProvider = new ServiceCollection()
.AddInMemoryRulesDataSource<ContentTypes, ConditionTypes>(ServiceLifetime.Singleton)
.BuildServiceProvider();
var rulesEngine = RulesEngineBuilder.CreateRulesEngine()
.WithContentType<ContentTypes>()
.WithConditionType<ConditionTypes>()
.SetInMemoryDataSource(serviceProvider)
.Build();
Expected behavior
The extension method for using the in-memory data source based on the IServiceCollection should be able to resolve an IInMemoryRulesStorage<TContentType, TConditionType>.
Prerequisites
Description
When using the built-in extensions to use the in-memory data source based on the rules stored on IServiceCollection, an
ArgumentNullException
is thrown. Sample bellow:Steps to reproduce
The following source code allows us to reproduce the issue:
Expected behavior
The extension method for using the in-memory data source based on the
IServiceCollection
should be able to resolve anIInMemoryRulesStorage<TContentType, TConditionType>
.Actual behavior
An
ArgumentNullException
is thrown.Rules Framework version
2.0.0