Skip to content

Commit

Permalink
Merge pull request #3 from delegateas/thygesteffensen/feat/addLogical…
Browse files Browse the repository at this point in the history
…Comparison

feat: Added logical comparison to DI extensions
  • Loading branch information
thygesteffensen authored Jul 5, 2021
2 parents 32af083 + 01fe1e3 commit b0adf9c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ExpressionEngine/FlowRunnerDependencyExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static void AddExpressionEngine(this IServiceCollection services)
AddStringFunctions(services);
AddCollectionFunction(services);
AddConversionFunction(services);
AddLogicalComparisonFunctions(services);

services.AddTransient<IFunction, LengthFunction>();
services.AddTransient<IFunction, GreaterFunction>();
Expand Down Expand Up @@ -68,5 +69,18 @@ private static void AddConversionFunction(IServiceCollection services)
services.AddTransient<IFunction, DataUriFunction>();
services.AddTransient<IFunction, DataUriToBinaryFunction>();
}

private static void AddLogicalComparisonFunctions(IServiceCollection services)
{
services.AddTransient<IFunction, AndFunction>();
services.AddTransient<IFunction, EqualFunction>();
services.AddTransient<IFunction, GreaterFunction>();
services.AddTransient<IFunction, GreaterOrEqualsFunction>();
services.AddTransient<IFunction, IfFunction>();
services.AddTransient<IFunction, LessFunction>();
services.AddTransient<IFunction, LessOrEqualsFunction>();
services.AddTransient<IFunction, NotFunction>();
services.AddTransient<IFunction, OrFunction>();
}
}
}

0 comments on commit b0adf9c

Please sign in to comment.