All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Permit state reentry from dynamic transitions #565
- This is a change in behavior from v5.15.0 (see #544); this version restores the previous behavior for
PermitDynamic
that allows reentry; if reentry is not the desired behavior, consider using a guard condition withPermitDynamicIf
.
- This is a change in behavior from v5.15.0 (see #544); this version restores the previous behavior for
- Remove getDestination, and use Destination property instead (internal refactor) #575
- Add overloads to
FireAsync
to support parameterized trigger arguments #570 - Add overloads to
CanFire
to support parameterized trigger arguments #574
- Prevent
NullReferenceException
in theInvocationInfo
class #566
- Updated net6.0 build target to net8.0 #551
- New abstract method,
GetInitialTransition
, added toGraphStyleBase
to remove DOT graph implementation fromStateGraph
#557- Classes that are derived from
GraphStyleBase
and are being migrated from an earlier release of Stateless will need to implement this method.
- Classes that are derived from
- Enable Source Link & Deterministic Builds #501
- Added optional
RetainSynchronizationContext
property #519 - Update example apps to
net6.0
#520 - Bump solution Visual Studio version to 2022 #526
- Remove obsolete TargetFrameworks #524
- Added
FireAsync(TriggerWithParameters, params object[])
overload #536
StateMachineInfo.InitialState.Transitions
throws ifAddRelationships
not called #514- Trigger information is missing for
OnEntryFromAsync
#511 - Fixed typos & redundant parentheses #512, #521, #522
- Change mechanism for losing the synchronization context #528
InvalidOperationException
thrown from call toFireAsync
#532- Added missing guard function parameter support from
InternalTransitionAsyncIf
#530 - Using
PermitIf
on a state with substates leads to reentry #544
- Add method to get permitted triggers with parameter information #494
- Fix incorrect initial state in dotgraph after trigger fired #495
- Add explicit .NET 6.0 framework support #479
- Stateless.Tests -> .NET 6 #484
- Update Readme regarding state machine events #488
- Typo in summary comment of class UmlDotGraph #471
- Github workflows/dotnet pack: Fix project path casing and directory separators #478
- Hardcode the AssemblyName attribute in the .csproj to "Stateless" #480
- Bump Newtonsoft.Json from 10.0.3 to 13.0.1 in /example/JsonExample #487
- Added CanFire overload to return unmet guard descriptions #443
- Inconsistency in sync/async statemachine execution #444
- Added support for spaces in state/trigger names in Graphviz node graphs by wrapping them in escaped quotes #447
Re-releasing 5.2.0 as v5.10.1. The version number was accidentally set to 5.10 when creating the 5.2 release. Version 5.10.0 is now listed as the newest, since it has the highest version number. 5.2.0 and 5.10.0 are identical.
- Added support for net50
- Only run tests under net50
- Non-code change: Switch to using Github Actions
- Fixed the bug "IgnoreIf Guard description is raised when PermitReentryIf Guard Fails". #422
- Fixed bug "When adding .PermitDynamicIf, call .PermitTriggers throw NullReferenceException" #416
- Fixed nullReferenceException when getting permitted triggers on a dynamic transition. #413
- Fixed OnTransitionCompletedEvent, it now has the correct Destination state when there is an initial transition. #413
- Added support for new OnTransitionCompletedEvent, which is run after all OnExit / OnEntry methods have run #394
- Fixed spelling errors
- Fixed analyser warnings (mostly null checks)
- Added CLSCompliant attribute, which went missing in November 2019 #401
- Fixed Unmet guard collection not set by OnUnhandledTrigger if transition guard of substate fails #398 (Thanks to the awesome DeepakParamkusam)
- Fixed ambiguos guard function call when trigger is a state #380
- Fixed wrong onTransitionEvent ordering in Async firing [#372]
- Inverted if (_firingMode.Equals(FiringMode.Immediate) into if (FiringMode.Immediate.Equals(_firingMode) to avoid VerificationException when including assembly AllowPartiallyTrustedCallers #365.
- Added missing possible destination states to all PermitDynamic and PermitDynamicIf, see issue #305.
- Fixed trigger execution order issue if there are uncaught exceptions. Ref issue #267
- Fixed issue #272 and #275. Triggers with no parameters threw exceptions when checking if they could be fired, or retrieved with GetPermittedTriggers.
- Added missing initial transition, see PR #286.
- Activate and deactivate actions only runs on manual call to Activate / Deactivate. This breaks the v4.4 implementation, where activate/deactivate actions are run on every state transition.
- PR #348 Added trigger parameters to OnTransitioned event
- #342 StateMutator is called multiple times with the same state
- #345 Wrong behavior with FiringMode.Immediate in version 4.3.0
- #339 OnEntry behavour different: Unit test broken when updated to 4.3.0 from 4.2.1
- #292 Nested InitialTransitions calls superstate onEntry twice
- Netstandard2.0 support
4.2.0 - 2018.06.01
- PR #254 Add initial transitions
- Simplified examples a bit and added comments
- #261 Reentrant trigger in substate causes exit action to be executed twice
- #263 NullReferenceException bug introduced in commit c13e181b
4.1.0 - 2018-05-18
- #246 Queuing should not be the default behavior
- #191 Shouldn't Reentry fire OnEntry from substate?
- #228 guard function called twice?
- #214 Transition object holds parent state as source state instead of child
- #249 Latest prerelease v4.0.1-dev-00294 bug (Internal transition handler not executing)
4.0.0 - 2017-09-30
- #169 HTML format DOT graph output
- #132 Conditional InternalTransition
- #130 Support InternalTransition for all TriggerWithParams
- #178 Replace calls to Enforce.ArgumentNotNull with in-place null checks, and other changes suggested by CodeCracker
- #168 Modified the output of OnUnmute to display the correct message
- #164 Reducing confusion, and fixing invalid cast in Reflection.
- #158 Create new ActionInfo class, start insinuating it
- #156 TriggerInfo.Value -> UnderlyingTrigger
- #149 Moved StateType and TriggerType into StateMachineInfo, removed TriggerInfo
- #147 Extracting common abstract base class for transition info
- #142 Further reflection API refinement
- #141 Update to RTM dotnet tooling/VS2017
- #137 Replace magic string usages with nameof()
- #125 Adding check for cyclic configuration
- #123 Update for the current .NET Core version
- #175 Fix Multiple internal transition actions executed if defined in state hierarchy, and Renamed DynamicTransitionInfo.Destination to DestinationDescription
- #144 Fix unbounded recursion/fully initialize sub/super-states
- #140 Adding recursive trigger processing to InternalFireAsync