33using ExpressionEngine . Functions . Implementations . ConversionFunctions ;
44using ExpressionEngine . Functions . Implementations . LogicalComparisonFunctions ;
55using ExpressionEngine . Functions . Implementations . StringFunctions ;
6+ using ExpressionEngine . Functions . Math ;
67using Microsoft . Extensions . DependencyInjection ;
78
89namespace ExpressionEngine
@@ -18,6 +19,7 @@ public static void AddExpressionEngine(this IServiceCollection services)
1819 AddCollectionFunction ( services ) ;
1920 AddConversionFunction ( services ) ;
2021 AddLogicalComparisonFunctions ( services ) ;
22+ AddMathFunctions ( services ) ;
2123
2224 services . AddTransient < IFunction , LengthFunction > ( ) ;
2325 services . AddTransient < IFunction , GreaterFunction > ( ) ;
@@ -80,5 +82,18 @@ private static void AddLogicalComparisonFunctions(IServiceCollection services)
8082 services . AddTransient < IFunction , NotFunction > ( ) ;
8183 services . AddTransient < IFunction , OrFunction > ( ) ;
8284 }
85+
86+ private static void AddMathFunctions ( IServiceCollection services )
87+ {
88+ services . AddTransient < IFunction , AndFunction > ( ) ;
89+ services . AddTransient < IFunction , DivFunction > ( ) ;
90+ services . AddTransient < IFunction , MaxFunction > ( ) ;
91+ services . AddTransient < IFunction , MinFunction > ( ) ;
92+ services . AddTransient < IFunction , ModFunction > ( ) ;
93+ services . AddTransient < IFunction , MulFunction > ( ) ;
94+ services . AddTransient < IFunction , RandFunction > ( ) ;
95+ services . AddTransient < IFunction , RangeFunction > ( ) ;
96+ services . AddTransient < IFunction , SubFunction > ( ) ;
97+ }
8398 }
8499}
0 commit comments