Skip to content

Quality of Life Changes - Part 2#623

Merged
mclift merged 1 commit intodotnet-state-machine:devfrom
RedOrc:QualityOfLifeChangesPart2
Aug 21, 2025
Merged

Quality of Life Changes - Part 2#623
mclift merged 1 commit intodotnet-state-machine:devfrom
RedOrc:QualityOfLifeChangesPart2

Conversation

@RedOrc
Copy link
Contributor

@RedOrc RedOrc commented Aug 19, 2025

  • Added some improvements to help optimize performance in the GraphStyleBase class with respect to internal array re-allocation frequency. Also added clarity to convoluted if/else type evaluation.

  • Replaced new List<InvocationInfo>() with Array.Empty<InvocationInfo>() to optimize memory usage. The Array.Empty<T> type is a shared immutable enumerable type which is perfect for the use case and avoids heap allocation of the new List<T>() type.

  • Fixed a potential System.IndexOutOfRangeException in the ParameterConversion.cs file by also considering whether the specified index is zero or greater.

  • Added unit tests for ParameterConversion.cs in a new ParameterConversionTests.cs file. This ensures the integrity of those important methods.

@RedOrc
Copy link
Contributor Author

RedOrc commented Aug 19, 2025

@mclift I've got another quality of life change here 😎 .

@mclift
Copy link
Member

mclift commented Aug 21, 2025

Thank you, @RedOrc!

@mclift mclift merged commit 34a268b into dotnet-state-machine:dev Aug 21, 2025
1 check passed
@mclift mclift mentioned this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants