Skip to content

Commit

Permalink
3.1 update (#22)
Browse files Browse the repository at this point in the history
* migrating to Immutable items for state

migrating items to Immutable types in the state interfaces

* additional code cleanup and improvesments for immutable items as well as newer switch styling

* additional cleanups

additional code cleanups to remove warnings

* added fallback datetime

added in a fallback datetime parser as a precaution for older variable encoded dates

* updating package version

updating the package version number

* migrated state storage

migrated state storage pieces into component classes in order to try and make the code cleaner and easier to read.

* refactor version

refactored version to run exclusively in dotnet8 as well as improvements in code quality

* code cleanup

code cleanups

* updated package version

updated package version
  • Loading branch information
roger-castaldo authored Sep 5, 2024
1 parent 7737e9c commit abd1063
Show file tree
Hide file tree
Showing 256 changed files with 3,721 additions and 4,061 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/unittests6x.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/unittests7x.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/unittestsCodeio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore -p:TargetFramework=net6.0 UnitTest
- name: Build-6.0
run: dotnet build --framework net6.0 --no-restore UnitTest
- name: Test-6.0
run: dotnet test --framework net6.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover UnitTest
run: dotnet restore -p:TargetFramework=net8.0 UnitTest
- name: Build-8.0
run: dotnet build --framework net8.0 --no-restore UnitTest
- name: Test-8.0
run: dotnet test --framework net8.0 --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover UnitTest
- name: Codecov coverage upload
uses: codecov/[email protected]
12 changes: 6 additions & 6 deletions .github/workflows/unittestsJint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore -p:TargetFramework=net6.0 UnitTest
- name: Build-6.0
run: dotnet build --framework net6.0 --no-restore UnitTest
- name: Test-6.0
run: dotnet test --framework net6.0 --no-build --verbosity normal --filter "FullyQualifiedName=UnitTest.Extensions.Scripts.TestJavascript" UnitTest
run: dotnet restore -p:TargetFramework=net8.0 UnitTest
- name: Build-8.0
run: dotnet build --framework net8.0 --no-restore UnitTest
- name: Test-8.0
run: dotnet test --framework net8.0 --no-build --verbosity normal --filter "FullyQualifiedName=UnitTest.Extensions.Scripts.TestJavascript" UnitTest
4 changes: 4 additions & 0 deletions BPMNEngine/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# IDE0022: Use block body for method
csharp_style_expression_bodied_methods = when_on_single_line
Binary file modified BPMNEngine/.vs/BPMNEngine/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified BPMNEngine/.vs/BPMNEngine/v17/.futdcache.v2
Binary file not shown.
Binary file modified BPMNEngine/.vs/BPMNEngine/v17/.suo
Binary file not shown.
61 changes: 61 additions & 0 deletions BPMNEngine/.vs/BPMNEngine/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Roger Castaldo\\source\\repos\\BPMEngine\\BPMNEngine\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 1,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedHeight": 275,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{004be353-6879-467c-9d1e-9ac23cdf6d49}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{e1b7d1f8-9b3c-49b1-8f4f-bfc63a88835d}"
}
]
},
{
"DockedHeight": 275,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{a80febb4-e7e0-4147-b476-21aaf2453969}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{320fd13f-632f-4b16-9527-a1adfe555f6c}"
}
]
}
]
}
]
}
Binary file modified BPMNEngine/.vs/BPMNEngine/v17/TestStore/0/testlog.manifest
Binary file not shown.
Binary file not shown.
Binary file not shown.
25 changes: 0 additions & 25 deletions BPMNEngine/Attributes/AttributeRegex.cs

This file was deleted.

15 changes: 15 additions & 0 deletions BPMNEngine/Attributes/AttributeRegexAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using BPMNEngine.Elements;
using System.Text.RegularExpressions;

namespace BPMNEngine.Attributes
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
internal class AttributeRegexAttribute(string name, string regex) : Attribute
{
public string Name { get; private init; } = name;
public Regex Reg { get; private init; } = new Regex(regex, RegexOptions.Compiled|RegexOptions.ECMAScript);

public bool IsValid(AElement elem)
=> elem[Name]!=null && Reg.IsMatch(elem[Name]);
}
}
13 changes: 0 additions & 13 deletions BPMNEngine/Attributes/RequiredAttribute.cs

This file was deleted.

8 changes: 8 additions & 0 deletions BPMNEngine/Attributes/RequiredAttributeAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace BPMNEngine.Attributes
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
internal class RequiredAttributeAttribute(string name) : Attribute
{
public string Name { get; private init; } = name;
}
}
11 changes: 3 additions & 8 deletions BPMNEngine/Attributes/ValidParentAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
namespace BPMNEngine.Attributes
{
[AttributeUsage(AttributeTargets.Class,AllowMultiple=true,Inherited =true)]
internal class ValidParentAttribute : Attribute
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
internal class ValidParentAttribute(Type parent) : Attribute
{
public Type Parent { get; private init; }

public ValidParentAttribute(Type parent)
{
Parent = parent;
}
public Type Parent { get; private init; } = parent;
}
}
27 changes: 0 additions & 27 deletions BPMNEngine/Attributes/XMLTag.cs

This file was deleted.

17 changes: 17 additions & 0 deletions BPMNEngine/Attributes/XMLTagAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace BPMNEngine.Attributes
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
internal class XMLTagAttribute(string prefix, string name) : Attribute
{
public string Name { get; private init; } = name;
public string Prefix { get; private init; } = prefix;

public override string ToString()
=> (Prefix==null ? Name : $"{Prefix}:{Name}");

internal bool Matches(XmlPrefixMap map, string tagName)
=> tagName.Equals(ToString(), StringComparison.CurrentCultureIgnoreCase)
||tagName.Equals(Name, StringComparison.CurrentCultureIgnoreCase)
||(Prefix != null && map.IsMatch(Prefix, Name, tagName));
}
}
22 changes: 11 additions & 11 deletions BPMNEngine/BPMNEngine.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>BPMNEngine</RootNamespace>
<PackageId>BPMNEngine</PackageId>
<Version>3.0.0</Version>
<Version>3.1.0</Version>
<Authors>Roger Castaldo</Authors>
<Description>A BPMN Engine written in .net. The engine attempts to read in a bpmn notation xml document defining both the process(s) as well as the diagrams. From here you can then load/unload the state, render the diagram in its current state or animated into a gif. Using the delegates for a process, you intercept and handle task and condition checking by reading additional xml held within flow and task objects.</Description>
<PackageProjectUrl>https://github.com/roger-castaldo/BPMEngine</PackageProjectUrl>
<RepositoryUrl>https://github.com/roger-castaldo/BPMEngine</RepositoryUrl>
<PackageTags>BPMN</PackageTags>
<PackageReleaseNotes>Major revision to a new library with breaking changes, including the concept of a process instance and creating named parameters for supplying all delegates. Improved memory management and performance has been acheived using built in dotnet concepts that also display improved performances when running inside .net8 vs .net7 vs .net6.</PackageReleaseNotes>
<AssemblyVersion>3.0.0</AssemblyVersion>
<FileVersion>3.0.0</FileVersion>
<AssemblyVersion>3.1.0</AssemblyVersion>
<FileVersion>3.1.0</FileVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down Expand Up @@ -56,18 +56,18 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Maui.Graphics" Version="8.0.3" />
<PackageReference Include="Microsoft.Maui.Graphics.Skia" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Maui.Graphics" Version="8.0.60" />
<PackageReference Include="Microsoft.Maui.Graphics.Skia" Version="8.0.60" />
<PackageReference Include="Vsxmd" Version="1.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.CodeDom" Version="8.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Compilers" Version="4.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Compilers" Version="4.10.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" />
<PackageReference Include="SkiaSharp.NativeAssets.macOS" Version="2.88.6" />
<PackageReference Include="SkiaSharp.NativeAssets.Win32" Version="2.88.6" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.8" />
<PackageReference Include="SkiaSharp.NativeAssets.macOS" Version="2.88.8" />
<PackageReference Include="SkiaSharp.NativeAssets.Win32" Version="2.88.8" />
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions BPMNEngine/BPMNEngine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPMNEngine", "BPMNEngine.cs
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "..\UnitTest\UnitTest.csproj", "{25AF2381-DB41-418D-B0D4-F7BA5129EF6B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{444BE3E3-36E7-4230-8CCC-D0F9CBCB03E9}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
Loading

0 comments on commit abd1063

Please sign in to comment.