Cleanup unused code and blanks

This commit is contained in:
Sipke Schoorstra 2023-07-09 12:33:26 +02:00
parent 7e0d7d825e
commit 77b1a97682
4 changed files with 8 additions and 20 deletions

View file

@ -1,16 +1,11 @@
using Elsa;
using Elsa.EntityFrameworkCore.Modules.Identity;
using Elsa.EntityFrameworkCore.Modules.Labels;
using Elsa.EntityFrameworkCore.Modules.Management;
using Elsa.EntityFrameworkCore.Modules.Runtime;
using Elsa.Extensions;
using Elsa.Http.Handlers;
using Elsa.JavaScript.Options;
using Elsa.MongoDb.Extensions;
using Elsa.MongoDb.Modules.Identity;
using Elsa.MongoDb.Modules.Labels;
using Elsa.MongoDb.Modules.Management;
using Elsa.MongoDb.Modules.Runtime;
using Elsa.WorkflowServer.Web;
EndpointSecurityOptions.DisableSecurity();
@ -18,7 +13,6 @@ EndpointSecurityOptions.DisableSecurity();
var builder = WebApplication.CreateBuilder(args);
var services = builder.Services;
var configuration = builder.Configuration;
var sqliteConnectionString = configuration.GetConnectionString("Sqlite")!;
var identitySection = configuration.GetSection("Identity");
var identityTokenSection = identitySection.GetSection("Tokens");

View file

@ -93,7 +93,7 @@ public static class DependencyInjectionExtensions
serializerOptions.Converters.Add(new VersionOptionsJsonConverter());
serializerOptions.Converters.Add(new ActivityJsonConverterFactory(serviceProvider));
serializerOptions.Converters.Add(new ExpressionJsonConverterFactory());
var settings = new RefitSettings
{
ContentSerializer = new SystemTextJsonContentSerializer(serializerOptions)

View file

@ -9,5 +9,12 @@ namespace Elsa.Workflows.Runtime.Contracts;
/// </summary>
public interface IWorkflowStateExporter
{
/// <summary>
/// Exports the workflow state.
/// </summary>
/// <param name="workflow"></param>
/// <param name="workflowState"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
ValueTask ExportAsync(Workflow workflow, WorkflowState workflowState, CancellationToken cancellationToken);
}

View file

@ -1,13 +0,0 @@
using Elsa.Workflows.Runtime.Contracts;
using Microsoft.Extensions.DependencyInjection;
// ReSharper disable once CheckNamespace
namespace Elsa.Extensions;
public static class WorkflowStateExporterSetExtensions
{
/// <summary>
/// Register a workflow factory that creates an instance of the specified workflow type.
/// </summary>
public static void Add<TExporter>(this ISet<Func<IServiceProvider, IWorkflowStateExporter>> set) where TExporter : IWorkflowStateExporter => set.Add(sp => ActivatorUtilities.GetServiceOrCreateInstance<TExporter>(sp));
}