Refactor Program.cs to simplify options and remove unused constants. Clean up solution file and update namespace for ConfigureEngineWithVariableTypes.
This commit is contained in:
parent
dec9c121f4
commit
a6a491cde7
3
Elsa.sln
3
Elsa.sln
|
|
@ -596,9 +596,6 @@ Global
|
|||
{66E2E2CF-967F-4564-89E8-F46FA973C99B} = {986E5482-0482-448C-B9E4-EC67A9474B85}
|
||||
{0A04B1FD-06C0-4271-A910-A08C263DBC44} = {0354F050-3992-4DD4-B0EE-5FBA04AC72B6}
|
||||
{9B80A705-2E31-4012-964A-83963DCDB384} = {0354F050-3992-4DD4-B0EE-5FBA04AC72B6}
|
||||
{CD7DC0D1-FFDC-417A-89BE-7F32408F583E} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
|
||||
{70593549-8B26-4D63-9857-6BA8BB3E31DB} = {CD7DC0D1-FFDC-417A-89BE-7F32408F583E}
|
||||
{E7137FB0-1988-4562-AD8D-D0D9D2EE85F6} = {CD7DC0D1-FFDC-417A-89BE-7F32408F583E}
|
||||
{7FD1FD1E-5778-4065-AAA5-1F878129EF77} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
|
||||
{EB24F9FE-D7BD-4FCC-907E-AE400288C2A5} = {7FD1FD1E-5778-4065-AAA5-1F878129EF77}
|
||||
{9CA02818-F7EB-4A0B-B27B-BC74ACD499C9} = {7FD1FD1E-5778-4065-AAA5-1F878129EF77}
|
||||
|
|
|
|||
|
|
@ -4,20 +4,12 @@ using Elsa.ServerAndStudio.Web.Extensions;
|
|||
using Medallion.Threading.FileSystem;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
const bool useMassTransit = true;
|
||||
const bool useProtoActor = true;
|
||||
const bool useCaching = true;
|
||||
const DistributedCachingTransport distributedCachingTransport = DistributedCachingTransport.MassTransit;
|
||||
const MassTransitBroker useMassTransitBroker = MassTransitBroker.Memory;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.WebHost.UseStaticWebAssets();
|
||||
var services = builder.Services;
|
||||
var configuration = builder.Configuration;
|
||||
var identitySection = configuration.GetSection("Identity");
|
||||
var identityTokenSection = identitySection.GetSection("Tokens");
|
||||
var heartbeatSection = configuration.GetSection("Heartbeat");
|
||||
var sqlDatabaseProvider = Enum.Parse<SqlDatabaseProvider>(configuration["DatabaseProvider"] ?? "Sqlite");
|
||||
|
||||
// Add Elsa services.
|
||||
services
|
||||
|
|
@ -55,9 +47,7 @@ services
|
|||
})
|
||||
.UseHttp(http =>
|
||||
{
|
||||
if (useCaching)
|
||||
http.UseCache();
|
||||
|
||||
http.UseCache();
|
||||
http.ConfigureHttpOptions = options =>
|
||||
{
|
||||
options.BaseUrl = new Uri(configuration["Hosting:BaseUrl"] ?? configuration["Http:BaseUrl"]!); // HttpBaseUrl is for backward compatibility.
|
||||
|
|
@ -65,8 +55,6 @@ services
|
|||
};
|
||||
})
|
||||
.UseWorkflowsApi()
|
||||
.UseCompression()
|
||||
.Use<IOHttpFeature>()
|
||||
.AddActivitiesFrom<Program>()
|
||||
.AddWorkflowsFrom<Program>();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
using Elsa.Expressions.JavaScript.Notifications;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.JavaScript.Notifications;
|
||||
using Elsa.Mediator.Contracts;
|
||||
using Elsa.Workflows.Management.Options;
|
||||
using JetBrains.Annotations;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Elsa.JavaScript.Handlers;
|
||||
namespace Elsa.Expressions.JavaScript.Handlers;
|
||||
|
||||
[UsedImplicitly]
|
||||
public class ConfigureEngineWithWorkflowVariableTypes(IOptions<ManagementOptions> options)
|
||||
|
|
|
|||
Loading…
Reference in a new issue