Skip to content

#43 Refactor Result, Error, and ValidationState - #44

Merged
dannygoodacre merged 5 commits into
mainfrom
43-refactor-result-and-error
Sep 8, 2026
Merged

dannygoodacre merged 5 commits into
mainfrom
43-refactor-result-and-error

Conversation

@dannygoodacre

@dannygoodacre dannygoodacre commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner
  • Uninherit generic Success from Success
  • Add ISuccessResult to unify checking results for success
  • Move MapFailure to its own extension class.
  • Seal all childless result records
  • Remove Exception property from Error
  • DX and performance improvements to ValidationState

@dannygoodacre dannygoodacre self-assigned this Sep 8, 2026
@dannygoodacre dannygoodacre linked an issue Sep 8, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Summary

Summary
Generated on: 09/08/2026 - 20:57:14
Coverage date: 09/08/2026 - 20:57:11 - 09/08/2026 - 20:57:13
Parser: MultiReport (4x Cobertura)
Assemblies: 5
Classes: 37
Files: 24
Line coverage: 93.8% (474 of 505)
Covered lines: 474
Uncovered lines: 31
Coverable lines: 505
Total lines: 1525
Branch coverage: 83.1% (128 of 154)
Covered branches: 128
Total branches: 154
Method coverage: Feature is only available for sponsors

Coverage

DannyGoodacre.Cqrs - 90.1%
Name Line Branch
DannyGoodacre.Cqrs 90.1% 80%
DannyGoodacre.Cqrs.CommandHandler`1 100%
DannyGoodacre.Cqrs.CommandHandler`2 100%
DannyGoodacre.Cqrs.CommandHandlerBase`2 100% 100%
DannyGoodacre.Cqrs.LoggerExtensions 100% 50%
DannyGoodacre.Cqrs.QueryHandler`2 96.1% 100%
DannyGoodacre.Cqrs.StateCommandHandler`1 50% 50%
DannyGoodacre.Cqrs.StateCommandHandler`2 50% 50%
DannyGoodacre.Cqrs.StateCommandHandlerBase`2 96.1% 100%
DannyGoodacre.Cqrs.TransactionCommandHandler`1 50% 100%
DannyGoodacre.Cqrs.TransactionCommandHandler`2 50% 100%
DannyGoodacre.Cqrs.TransactionCommandHandlerBase`2 97.7% 100%
DannyGoodacre.Cqrs.TypeExtensions 100% 92.8%
Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions 100% 100%
DannyGoodacre.Cqrs.EntityFrameworkCore - 100%
Name Line Branch
DannyGoodacre.Cqrs.EntityFrameworkCore 100% 81.2%
DannyGoodacre.Cqrs.EntityFrameworkCore.DbContextTransactionUnit`1 100% 91.6%
Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions 100% 50%
DannyGoodacre.Cqrs.Testing - 98.2%
Name Line Branch
DannyGoodacre.Cqrs.Testing 98.2% 100%
DannyGoodacre.Cqrs.Testing.CommandHandlerTestCore`2 100%
DannyGoodacre.Cqrs.Testing.LoggerMockExtensions 100%
DannyGoodacre.Cqrs.Testing.QueryHandlerTestBase`2 100%
DannyGoodacre.Cqrs.Testing.StateCommandHandlerTestCore`2 100%
DannyGoodacre.Cqrs.Testing.TransactionCommandHandlerTestCore`2 94.4% 100%
DannyGoodacre.Primitives - 98.2%
Name Line Branch
DannyGoodacre.Primitives 98.2% 95.4%
DannyGoodacre.Primitives.Conflict 100%
DannyGoodacre.Primitives.Conflict`1 100%
DannyGoodacre.Primitives.DomainError 100%
DannyGoodacre.Primitives.DomainError`1 100%
DannyGoodacre.Primitives.Error 100%
DannyGoodacre.Primitives.InternalError 100%
DannyGoodacre.Primitives.InternalError`1 100%
DannyGoodacre.Primitives.Invalid 100%
DannyGoodacre.Primitives.Invalid`1 100%
DannyGoodacre.Primitives.IResult 100%
DannyGoodacre.Primitives.Result 100%
DannyGoodacre.Primitives.Result`1 100%
DannyGoodacre.Primitives.ResultExtensions 92.3% 92.8%
DannyGoodacre.Primitives.Success`1 100%
DannyGoodacre.Primitives.ValidationState 100% 100%
DannyGoodacre.Testing - 97.2%
Name Line Branch
DannyGoodacre.Testing 97.2% 81.2%
DannyGoodacre.Testing.LoggerExtensions 94.4% 50%
DannyGoodacre.Testing.TestBase 98.2% 83.3%

Full coverage report artifact

@dannygoodacre
dannygoodacre merged commit 1c19b35 into main Sep 8, 2026
1 check passed
@dannygoodacre
dannygoodacre deleted the 43-refactor-result-and-error branch September 8, 2026 20:59
dannygoodacre added a commit that referenced this pull request Sep 8, 2026
- Uninherit generic Success from Success
- Add ISuccessResult to unify checking results for success
- Move MapFailure to its own extension class.
- Seal all childless result records
- Remove Exception property from Error
- DX and performance improvements to ValidationState
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.

Refactor Result and Error

1 participant