Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple Expression Types #4622

Merged
merged 8 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Incremental work
  • Loading branch information
sfmskywalker committed Nov 13, 2023
commit e4e7b6290bd38e5cf68023456c85773c74cad85f
1 change: 1 addition & 0 deletions Elsa.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=initializable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=materializers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Populator/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Postgre/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=startable/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
33 changes: 15 additions & 18 deletions src/bundles/Elsa.WorkflowServer.Web/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Text.Encodings.Web;
using Elastic.Clients.Elasticsearch.IndexManagement;
using Elsa.Alterations.Extensions;
using Elsa.Alterations.MassTransit.Extensions;
using Elsa.Dapper.Extensions;
Expand All @@ -18,7 +16,6 @@
using Elsa.MongoDb.Modules.Management;
using Elsa.MongoDb.Modules.Runtime;
using Elsa.WorkflowServer.Web.WorkflowContexts;
using FluentStorage;
using Microsoft.Data.Sqlite;
using Microsoft.Extensions.Options;
using Proto.Persistence.Sqlite;
Expand Down Expand Up @@ -151,21 +148,21 @@
options.AppendScript("string Greet(string name) => $\"Hello {name}!\";");
options.AppendScript("string SayHelloWorld() => Greet(\"World\");");
})
.UseJavaScript(options =>
{
options.AllowClrAccess = true;
options.ConfigureEngine(engine =>
{
engine.Execute("function greet(name) { return `Hello ${name}!`; }");
engine.Execute("function sayHelloWorld() { return greet('World'); }");
});
})
.UsePython(options =>
{
options.AddScript("def greet(name): return f\"Hello {name}!\";");
options.AddScript("def say_hello_world(): return greet(\"World\");");
})
.UseLiquid(liquid => liquid.FluidOptions = options => options.Encoder = HtmlEncoder.Default)
// .UseJavaScript(options =>
// {
// options.AllowClrAccess = true;
// options.ConfigureEngine(engine =>
// {
// engine.Execute("function greet(name) { return `Hello ${name}!`; }");
// engine.Execute("function sayHelloWorld() { return greet('World'); }");
// });
// })
// .UsePython(options =>
// {
// options.AddScript("def greet(name): return f\"Hello {name}!\";");
// options.AddScript("def say_hello_world(): return greet(\"World\");");
// })
// .UseLiquid(liquid => liquid.FluidOptions = options => options.Encoder = HtmlEncoder.Default)
.UseHttp(http =>
{
http.ConfigureHttpOptions = options => configuration.GetSection("Http").Bind(options);
Expand Down
8 changes: 0 additions & 8 deletions src/clients/Elsa.Api.Client/Contracts/IExpression.cs

This file was deleted.

71 changes: 0 additions & 71 deletions src/clients/Elsa.Api.Client/Converters/ExpressionJsonConverter.cs

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions src/clients/Elsa.Api.Client/Elsa.Api.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
<PackageReference Include="Refit" Version="7.0.0" />
<PackageReference Include="Refit.HttpClientFactory" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Expressions\" />
</ItemGroup>

</Project>
37 changes: 0 additions & 37 deletions src/clients/Elsa.Api.Client/Expressions/CSharpExpression.cs

This file was deleted.

37 changes: 0 additions & 37 deletions src/clients/Elsa.Api.Client/Expressions/JavaScriptExpression.cs

This file was deleted.

36 changes: 0 additions & 36 deletions src/clients/Elsa.Api.Client/Expressions/LiquidExpression.cs

This file was deleted.

36 changes: 0 additions & 36 deletions src/clients/Elsa.Api.Client/Expressions/LiteralExpression.cs

This file was deleted.

36 changes: 0 additions & 36 deletions src/clients/Elsa.Api.Client/Expressions/ObjectExpression.cs

This file was deleted.

Loading