mirror of
https://github.com/Biarity/Sieve.git
synced 2025-01-19 00:22:48 +01:00
Revert to _mapper assignment in constructor. (#140)
This commit is contained in:
parent
a5b9e5757e
commit
cc9c2b0a9a
@ -70,13 +70,13 @@ namespace Sieve.Services
|
|||||||
private const string NullFilterValue = "null";
|
private const string NullFilterValue = "null";
|
||||||
private readonly ISieveCustomSortMethods _customSortMethods;
|
private readonly ISieveCustomSortMethods _customSortMethods;
|
||||||
private readonly ISieveCustomFilterMethods _customFilterMethods;
|
private readonly ISieveCustomFilterMethods _customFilterMethods;
|
||||||
private SievePropertyMapper _mapper;
|
private readonly SievePropertyMapper _mapper = new SievePropertyMapper();
|
||||||
private SievePropertyMapper Mapper => _mapper ??= MapProperties(new SievePropertyMapper());
|
|
||||||
|
|
||||||
public SieveProcessor(IOptions<SieveOptions> options,
|
public SieveProcessor(IOptions<SieveOptions> options,
|
||||||
ISieveCustomSortMethods customSortMethods,
|
ISieveCustomSortMethods customSortMethods,
|
||||||
ISieveCustomFilterMethods customFilterMethods)
|
ISieveCustomFilterMethods customFilterMethods)
|
||||||
{
|
{
|
||||||
|
_mapper = MapProperties(_mapper);
|
||||||
Options = options;
|
Options = options;
|
||||||
_customSortMethods = customSortMethods;
|
_customSortMethods = customSortMethods;
|
||||||
_customFilterMethods = customFilterMethods;
|
_customFilterMethods = customFilterMethods;
|
||||||
@ -85,6 +85,7 @@ namespace Sieve.Services
|
|||||||
public SieveProcessor(IOptions<SieveOptions> options,
|
public SieveProcessor(IOptions<SieveOptions> options,
|
||||||
ISieveCustomSortMethods customSortMethods)
|
ISieveCustomSortMethods customSortMethods)
|
||||||
{
|
{
|
||||||
|
_mapper = MapProperties(_mapper);
|
||||||
Options = options;
|
Options = options;
|
||||||
_customSortMethods = customSortMethods;
|
_customSortMethods = customSortMethods;
|
||||||
}
|
}
|
||||||
@ -92,12 +93,14 @@ namespace Sieve.Services
|
|||||||
public SieveProcessor(IOptions<SieveOptions> options,
|
public SieveProcessor(IOptions<SieveOptions> options,
|
||||||
ISieveCustomFilterMethods customFilterMethods)
|
ISieveCustomFilterMethods customFilterMethods)
|
||||||
{
|
{
|
||||||
|
_mapper = MapProperties(_mapper);
|
||||||
Options = options;
|
Options = options;
|
||||||
_customFilterMethods = customFilterMethods;
|
_customFilterMethods = customFilterMethods;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SieveProcessor(IOptions<SieveOptions> options)
|
public SieveProcessor(IOptions<SieveOptions> options)
|
||||||
{
|
{
|
||||||
|
_mapper = MapProperties(_mapper);
|
||||||
Options = options;
|
Options = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user