Fallout-build / Fallout-build/Fallout

Delete dead shims: Lazy.cs and Dictionary.GetOrDefault (netstandard2.0)

Open
#357 1 comment 0 reactions 0 assignees View on GitHub
breaking-change enhancement target/vCurrent
Dominant language
C#
Stars
154
Forks
19
Avg merge
1d 22h
Merged PRs (30d)
15

Description

**Tier 2 — Cleanup.** Two helpers carry no weight:

- `src/Fallout.Utilities/Lazy.cs` (~18 LOC) — `Lazy.Create(func)` is just `new Lazy(func)`. Inline at call sites and delete.
- `src/Fallout.Utilities/Collections/Dictionary.GetOrDefault.cs` (~23 LOC) — a `netstandard2.0`-only `GetValueOrDefault` shim. Built into the BCL since .NET 5; the project no longer needs the polyfill.

### ⚠️ Breaking change
`Lazy.Create` is public surface → if removed outright, `breaking-change` + `experimental` + CHANGELOG migration note. Prefer an `[Obsolete]` forwarder for one cycle. The Dictionary shim is conditionally compiled and effectively dead.

### Acceptance
- [ ] `Lazy.Create` call sites inlined; type obsoleted/removed
- [ ] `Dictionary.GetOrDefault` netstandard2.0 conditional removed
- [ ] CHANGELOG entry if any public removal

_From dependency-consolidation audit, 2026-06-02._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.