2019-10-31 20:31:18 +00:00
|
|
|
using Elsa.Extensions;
|
2019-10-27 14:38:37 +00:00
|
|
|
using Elsa.Scripting.JavaScript.Services;
|
|
|
|
|
using Elsa.Services;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace Elsa.Scripting.JavaScript.Extensions
|
|
|
|
|
{
|
|
|
|
|
public static class JavaScriptServiceCollectionExtensions
|
|
|
|
|
{
|
|
|
|
|
public static IServiceCollection AddJavaScriptExpressionEvaluator(this IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
return services
|
|
|
|
|
.TryAddProvider<IExpressionEvaluator, JavaScriptExpressionEvaluator>(ServiceLifetime.Scoped)
|
2019-10-31 20:31:18 +00:00
|
|
|
.AddNotificationHandlers(typeof(JavaScriptServiceCollectionExtensions));
|
2019-10-27 14:38:37 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|