Remove broken in-memory provider
This commit is contained in:
parent
8e1ad31f73
commit
df33afc2aa
|
|
@ -84,8 +84,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.ForLoopConsole
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.ReadLineEchoConsole", "src\samples\Elsa.Samples.ReadLineEchoConsole\Elsa.Samples.ReadLineEchoConsole.csproj", "{867CB845-B803-4D40-9360-3D11ADBD9CE9}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.ReadLineEchoConsole", "src\samples\Elsa.Samples.ReadLineEchoConsole\Elsa.Samples.ReadLineEchoConsole.csproj", "{867CB845-B803-4D40-9360-3D11ADBD9CE9}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.YesSql.Provider.Sqlite.InMemory", "src\core\Elsa.YesSql.Provider.Sqlite.InMemory\Elsa.YesSql.Provider.Sqlite.InMemory.csproj", "{D0364288-3072-44F4-877C-7721C20BC27F}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Core.IntegrationTests", "test\integration\Elsa.Core.IntegrationTests\Elsa.Core.IntegrationTests.csproj", "{4CB34AB3-01C9-4911-8914-EABAA744EAD3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Core.IntegrationTests", "test\integration\Elsa.Core.IntegrationTests\Elsa.Core.IntegrationTests.csproj", "{4CB34AB3-01C9-4911-8914-EABAA744EAD3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "component", "component", "{FC47A50F-03B2-47D8-AAFB-075314FBA186}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "component", "component", "{FC47A50F-03B2-47D8-AAFB-075314FBA186}"
|
||||||
|
|
@ -223,10 +221,6 @@ Global
|
||||||
{867CB845-B803-4D40-9360-3D11ADBD9CE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{867CB845-B803-4D40-9360-3D11ADBD9CE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{867CB845-B803-4D40-9360-3D11ADBD9CE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{867CB845-B803-4D40-9360-3D11ADBD9CE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{867CB845-B803-4D40-9360-3D11ADBD9CE9}.Release|Any CPU.Build.0 = Release|Any CPU
|
{867CB845-B803-4D40-9360-3D11ADBD9CE9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{D0364288-3072-44F4-877C-7721C20BC27F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{D0364288-3072-44F4-877C-7721C20BC27F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{D0364288-3072-44F4-877C-7721C20BC27F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{D0364288-3072-44F4-877C-7721C20BC27F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{4CB34AB3-01C9-4911-8914-EABAA744EAD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{4CB34AB3-01C9-4911-8914-EABAA744EAD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4CB34AB3-01C9-4911-8914-EABAA744EAD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4CB34AB3-01C9-4911-8914-EABAA744EAD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4CB34AB3-01C9-4911-8914-EABAA744EAD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{4CB34AB3-01C9-4911-8914-EABAA744EAD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
|
@ -317,7 +311,6 @@ Global
|
||||||
{150EF356-E8BC-4922-91C2-362017479409} = {7CD5C8D5-EC78-4A99-A514-F01CA7197AC8}
|
{150EF356-E8BC-4922-91C2-362017479409} = {7CD5C8D5-EC78-4A99-A514-F01CA7197AC8}
|
||||||
{F755FB1F-72FB-4F7B-8270-F5F40F4D6952} = {5E5E1E84-DDBC-40D6-B891-0D563A15A44A}
|
{F755FB1F-72FB-4F7B-8270-F5F40F4D6952} = {5E5E1E84-DDBC-40D6-B891-0D563A15A44A}
|
||||||
{867CB845-B803-4D40-9360-3D11ADBD9CE9} = {5E5E1E84-DDBC-40D6-B891-0D563A15A44A}
|
{867CB845-B803-4D40-9360-3D11ADBD9CE9} = {5E5E1E84-DDBC-40D6-B891-0D563A15A44A}
|
||||||
{D0364288-3072-44F4-877C-7721C20BC27F} = {35F44BE9-13D0-417C-A01A-F0787BEE6DC3}
|
|
||||||
{4CB34AB3-01C9-4911-8914-EABAA744EAD3} = {0A3C36AB-2ACF-4175-A512-66B4C3DB9371}
|
{4CB34AB3-01C9-4911-8914-EABAA744EAD3} = {0A3C36AB-2ACF-4175-A512-66B4C3DB9371}
|
||||||
{FC47A50F-03B2-47D8-AAFB-075314FBA186} = {AB1AE008-6FD6-414C-8E88-D735F42E1FA6}
|
{FC47A50F-03B2-47D8-AAFB-075314FBA186} = {AB1AE008-6FD6-414C-8E88-D735F42E1FA6}
|
||||||
{BB5819C7-434A-4AC5-8B0E-6C4FA672EBD5} = {FC47A50F-03B2-47D8-AAFB-075314FBA186}
|
{BB5819C7-434A-4AC5-8B0E-6C4FA672EBD5} = {FC47A50F-03B2-47D8-AAFB-075314FBA186}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Elsa.Extensions;
|
using Elsa.Extensions;
|
||||||
using Elsa.Indexes;
|
|
||||||
using Elsa.Services;
|
using Elsa.Services;
|
||||||
using Elsa.Triggers;
|
using Elsa.Triggers;
|
||||||
using NodaTime;
|
using NodaTime;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Elsa.Abstractions\Elsa.Abstractions.csproj" />
|
<ProjectReference Include="..\Elsa.Abstractions\Elsa.Abstractions.csproj" />
|
||||||
<ProjectReference Include="..\Elsa.YesSql.Provider.Sqlite.InMemory\Elsa.YesSql.Provider.Sqlite.InMemory.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
|
||||||
<LangVersion>latest</LangVersion>
|
|
||||||
<PackageVersion>1.0.0</PackageVersion>
|
|
||||||
<Authors>Elsa Contributors</Authors>
|
|
||||||
<Description>
|
|
||||||
Elsa is a set of workflow libraries and tools that enable lean and mean workflowing capabilities in any .NET Core application.
|
|
||||||
This package provides an in-memory Sqlite YesSQL provider, the default provider for Elsa.
|
|
||||||
</Description>
|
|
||||||
<Copyright>2020</Copyright>
|
|
||||||
<PackageProjectUrl>https://github.com/elsa-workflows/elsa-core</PackageProjectUrl>
|
|
||||||
<RepositoryUrl>https://github.com/elsa-workflows/elsa-core</RepositoryUrl>
|
|
||||||
<RepositoryType>GitHub</RepositoryType>
|
|
||||||
<PackageTags>elsa, workflows, orchard</PackageTags>
|
|
||||||
<PackageIcon>icon.png</PackageIcon>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="YesSql.Provider.Sqlite" Version="1.0.0-beta-1547"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="icon.png">
|
|
||||||
<Pack>True</Pack>
|
|
||||||
<PackagePath/>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
using Microsoft.Data.Sqlite;
|
|
||||||
|
|
||||||
namespace Elsa.YesSql.Provider.Sqlite.InMemory
|
|
||||||
{
|
|
||||||
public class InMemorySqliteConnection : SqliteConnection
|
|
||||||
{
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
// Don't dispose anything.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Data;
|
|
||||||
using YesSql;
|
|
||||||
using YesSql.Provider.Sqlite;
|
|
||||||
|
|
||||||
namespace Elsa.YesSql.Provider.Sqlite.InMemory
|
|
||||||
{
|
|
||||||
public static class InMemorySqliteDbProviderOptionsExtensions
|
|
||||||
{
|
|
||||||
public static IConfiguration RegisterInMemorySqlite(this IConfiguration configuration)
|
|
||||||
{
|
|
||||||
SqlDialectFactory.SqlDialects["inmemorysqliteconnection"] = new InMemorySqliteDialect();
|
|
||||||
CommandInterpreterFactory.CommandInterpreters["inmemorysqliteconnection"] = d => new SqliteCommandInterpreter(d);
|
|
||||||
|
|
||||||
return configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IConfiguration UseInMemorySqlite(
|
|
||||||
this IConfiguration configuration,
|
|
||||||
IsolationLevel isolationLevel = IsolationLevel.Serializable)
|
|
||||||
{
|
|
||||||
if (configuration == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(configuration));
|
|
||||||
}
|
|
||||||
|
|
||||||
RegisterInMemorySqlite(configuration);
|
|
||||||
configuration.ConnectionFactory = new SingletonDbConnectionFactory<InMemorySqliteConnection>("Filename=:memory:");
|
|
||||||
configuration.IsolationLevel = isolationLevel;
|
|
||||||
|
|
||||||
return configuration;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
using YesSql.Provider.Sqlite;
|
|
||||||
|
|
||||||
namespace Elsa.YesSql.Provider.Sqlite.InMemory
|
|
||||||
{
|
|
||||||
public class InMemorySqliteDialect : SqliteDialect
|
|
||||||
{
|
|
||||||
public override string Name => "InMemorySqlite";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Data.Common;
|
|
||||||
using YesSql;
|
|
||||||
|
|
||||||
namespace Elsa.YesSql.Provider.Sqlite.InMemory
|
|
||||||
{
|
|
||||||
public class SingletonDbConnectionFactory<TDbConnection> : IConnectionFactory
|
|
||||||
where TDbConnection : DbConnection, new()
|
|
||||||
{
|
|
||||||
private readonly string _connectionString;
|
|
||||||
private DbConnection _connection;
|
|
||||||
|
|
||||||
public Type DbConnectionType => typeof(TDbConnection);
|
|
||||||
|
|
||||||
public SingletonDbConnectionFactory(string connectionString)
|
|
||||||
{
|
|
||||||
_connectionString = connectionString;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DbConnection CreateConnection()
|
|
||||||
{
|
|
||||||
return _connection ??= new TDbConnection
|
|
||||||
{
|
|
||||||
ConnectionString = _connectionString
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
|
|
@ -3,7 +3,6 @@ using Elsa.Samples.WhileLoopWorker.Workflows;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using NodaTime;
|
using NodaTime;
|
||||||
using YesSql.Provider.Sqlite;
|
|
||||||
|
|
||||||
namespace Elsa.Samples.WhileLoopWorker
|
namespace Elsa.Samples.WhileLoopWorker
|
||||||
{
|
{
|
||||||
|
|
@ -20,7 +19,7 @@ namespace Elsa.Samples.WhileLoopWorker
|
||||||
(hostContext, services) =>
|
(hostContext, services) =>
|
||||||
{
|
{
|
||||||
services
|
services
|
||||||
.AddElsa(options => options.UsePersistence(db => db.UseSqLite("Data Source=elsa.db;Cache=Shared")))
|
.AddElsa()
|
||||||
.AddConsoleActivities()
|
.AddConsoleActivities()
|
||||||
.AddTimerActivities(options => options.SweepInterval = Duration.FromSeconds(1))
|
.AddTimerActivities(options => options.SweepInterval = Duration.FromSeconds(1))
|
||||||
.AddSingleton<PhoneCallService>()
|
.AddSingleton<PhoneCallService>()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue