asulwer / RulesEngine

Rules Engine with extensive Dynamic expression support
MIT License
6 stars 1 forks source link

CustomTypeProvider constructor can be simplified #24

Closed asulwer closed 4 days ago

asulwer commented 6 days ago

CustomTypeProvider line 18. IDE states line can be simplified

from

public CustomTypeProvider(Type[] types) : base(ParsingConfig.Default)
{
    _types = new HashSet<Type>(types ?? new Type[] { });
    _types.Add(typeof(ExpressionUtils));
}

to

public CustomTypeProvider(Type[] types) : base(ParsingConfig.Default)
{
    _types = new HashSet<Type>(types ?? new Type[] { }) {
        typeof(ExpressionUtils)
    };
}