Skip to content

Remove dead code: Postman wrapper, IFunctionStore.SetResult, Result static class#140

Open
stidsborg wants to merge 3 commits intomainfrom
remove-postman-type
Open

Remove dead code: Postman wrapper, IFunctionStore.SetResult, Result static class#140
stidsborg wants to merge 3 commits intomainfrom
remove-postman-type

Conversation

@stidsborg
Copy link
Copy Markdown
Owner

Summary

Continues the recent dead-code cleanup. Three independent removals on this branch:

  • Postman wrapper — two-method passthrough over MessageWriters with no behaviour of its own. Inlined the calls in the registration classes.
  • IFunctionStore.SetResult — never called from production code; the only callers were the three StoreTests cases that exist to test the method itself. Dropped from the interface, all four store implementations (InMemory + Postgres + SqlServer + MariaDB), the CrashableFunctionStore test wrappers, and the test methods.
  • public static class ResultResult.SucceedWithValue<T> and Result.SucceedWithUnit were both shadowed by the parallel Succeed.WithValue / Succeed.WithUnit that every callsite uses instead. Also dropped the unused ToMessageAndIdempotencyKey extension.

Verified against the Cleipnir.NET consumer repo — none of the removed APIs are referenced there.

Net: ~225 lines removed across 16 files.

Test plan

  • dotnet build clean (0 warnings)
  • InMemory store tests pass (64/64)
  • Postgres / SqlServer / MariaDB store tests pass in CI

Postman was a two-method passthrough over MessageWriters with no
behaviour of its own. Inline the calls in the registration classes
and drop the type.
The static `Result` class exposed `SucceedWithValue<T>` and
`SucceedWithUnit`, both shadowed by the parallel `Succeed` class that
every callsite uses instead. The `ToMessageAndIdempotencyKey` extension
had zero references.
`SetResult` was never called from production code; the only callers
were the three `StoreTests` cases that exist to test the method itself.
Drop the interface method, all four store implementations
(InMemory + Postgres + SqlServer + MariaDB), the test wrappers in
`CrashableFunctionStore`, and the abstract test methods plus their
overrides in each store's test project.
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.

1 participant