diff --git a/Examples/ConsoleApp/ConsoleApp.csproj b/Examples/Example.ConsoleApp/Example.ConsoleApp.csproj
similarity index 88%
rename from Examples/ConsoleApp/ConsoleApp.csproj
rename to Examples/Example.ConsoleApp/Example.ConsoleApp.csproj
index 3fecda7..4612c78 100644
--- a/Examples/ConsoleApp/ConsoleApp.csproj
+++ b/Examples/Example.ConsoleApp/Example.ConsoleApp.csproj
@@ -3,6 +3,7 @@
Exe
net6.0
+ latest
diff --git a/Examples/ConsoleApp/Program.cs b/Examples/Example.ConsoleApp/Program.cs
similarity index 98%
rename from Examples/ConsoleApp/Program.cs
rename to Examples/Example.ConsoleApp/Program.cs
index c728121..864cd33 100644
--- a/Examples/ConsoleApp/Program.cs
+++ b/Examples/Example.ConsoleApp/Program.cs
@@ -1,6 +1,5 @@
using FluentStateMachine;
using System;
-using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApp
diff --git a/FluentStateMachine.sln b/FluentStateMachine.sln
index 96bd9f7..2bd8e40 100644
--- a/FluentStateMachine.sln
+++ b/FluentStateMachine.sln
@@ -5,10 +5,6 @@ VisualStudioVersion = 17.0.31717.71
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentStateMachine", "FluentStateMachine\FluentStateMachine.csproj", "{D6D3C3E9-73EF-48E9-9D82-017BA0123C24}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "Examples\ConsoleApp\ConsoleApp.csproj", "{EA950F42-CB53-4119-8AB9-D9305AE8A32A}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{4C1BDDED-BF17-4F95-B295-4AC93351993A}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{35BB4148-B10F-4F43-833D-8FD5169DDA63}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
@@ -16,6 +12,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.ConsoleApp", "Examples\Example.ConsoleApp\Example.ConsoleApp.csproj", "{C5F5E949-3F64-44B3-82CA-A1CE2FB64253}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -26,17 +24,14 @@ Global
{D6D3C3E9-73EF-48E9-9D82-017BA0123C24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6D3C3E9-73EF-48E9-9D82-017BA0123C24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6D3C3E9-73EF-48E9-9D82-017BA0123C24}.Release|Any CPU.Build.0 = Release|Any CPU
- {EA950F42-CB53-4119-8AB9-D9305AE8A32A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EA950F42-CB53-4119-8AB9-D9305AE8A32A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EA950F42-CB53-4119-8AB9-D9305AE8A32A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EA950F42-CB53-4119-8AB9-D9305AE8A32A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C5F5E949-3F64-44B3-82CA-A1CE2FB64253}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5F5E949-3F64-44B3-82CA-A1CE2FB64253}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C5F5E949-3F64-44B3-82CA-A1CE2FB64253}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C5F5E949-3F64-44B3-82CA-A1CE2FB64253}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {EA950F42-CB53-4119-8AB9-D9305AE8A32A} = {4C1BDDED-BF17-4F95-B295-4AC93351993A}
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DACFBC98-29C9-4EB3-911D-D6D08B83C3ED}
EndGlobalSection
diff --git a/FluentStateMachine/FluentStateMachine.csproj b/FluentStateMachine/FluentStateMachine.csproj
index 241f375..0f570b5 100644
--- a/FluentStateMachine/FluentStateMachine.csproj
+++ b/FluentStateMachine/FluentStateMachine.csproj
@@ -1,14 +1,13 @@
- net45;netstandard2.0;netstandard2.1;
- FluentStateMachine
- FluentStateMachine
+ net45;netstandard2.0;netstandard2.1;net6.0
+ latest
true
..\FluentStateMachine.snk
- 1.0.0
- 1.0.0
- 1.0.0
+ 1.0.1
+ 1.0.1
+ 1.0.1
Leonid Salavatov
@@ -27,9 +26,5 @@
-
-
- NET45
-
diff --git a/FluentStateMachine/FsmExtensions.cs b/FluentStateMachine/FsmExtensions.cs
index 7bba377..8577275 100644
--- a/FluentStateMachine/FsmExtensions.cs
+++ b/FluentStateMachine/FsmExtensions.cs
@@ -7,7 +7,7 @@ namespace FluentStateMachine
public static class FsmExtensions
{
-#if NETSTANDARD2_1_OR_GREATER
+#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
private static async Task> ToListAsync(this IAsyncEnumerable items, CancellationToken cancellationToken = default)
{
var result = new List();
diff --git a/FluentStateMachine/IStateMachine.cs b/FluentStateMachine/IStateMachine.cs
index 42b5136..d1061a0 100644
--- a/FluentStateMachine/IStateMachine.cs
+++ b/FluentStateMachine/IStateMachine.cs
@@ -12,7 +12,7 @@ public interface IStateMachine : IStateMachine
Task JumpToAsync(TState state, object data = null, CancellationToken cancellationToken = default);
Task ResetToAsync(TState state, CancellationToken cancellationToken = default);
-#if NETSTANDARD2_1_OR_GREATER
+#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
IAsyncEnumerable GetStatesAsync(object data = null, CancellationToken cancellationToken = default);
IAsyncEnumerable GetEventsAsync(object data = null, CancellationToken cancellationToken = default);
#else
diff --git a/FluentStateMachine/StateMachine.cs b/FluentStateMachine/StateMachine.cs
index 4f8ce1f..95c58af 100644
--- a/FluentStateMachine/StateMachine.cs
+++ b/FluentStateMachine/StateMachine.cs
@@ -17,7 +17,7 @@ public StateMachine(FsmModel model)
public TState Current { get; private set; }
-#if NETSTANDARD2_1_OR_GREATER
+#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
public async IAsyncEnumerable GetStatesAsync(object data = null,
[System.Runtime.CompilerServices.EnumeratorCancellation] CancellationToken cancellationToken = default)
{