You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delete dead shims: Lazy.cs and Dictionary.GetOrDefault (netstandard2.0) #357
src/Fallout.Utilities/Lazy.cs (~18 LOC) — Lazy.Create<T>(func) is just new Lazy<T>(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
Insights from a discarded prototype (old paths; map to onion structure after #359).
Lazy.Create: inline the ~8 call sites to target-typed new(...); keep an [Obsolete] forwarder (it's public).
WARNING — the issue premise is wrong: Dictionary.GetOrDefault is NOT dead. The project still multi-targets netstandard2.0, and the polyfill is reached cross-assembly via InternalsVisibleTo. Deleting it broke netstandard2.0 builds in LookupTable, ReflectionUtility, CompletionUtility, TeamCity, TeamCityAttribute (~6 sites).
Fix before deleting: rewrite those sites to TryGetValue, then remove the file. Both TFMs then compile.
Activity
ChrisonSimtian commentedon Jun 3, 2026
Insights from a discarded prototype (old paths; map to onion structure after #359).
Lazy.Create: inline the ~8 call sites to target-typednew(...); keep an[Obsolete]forwarder (it's public).Dictionary.GetOrDefaultis NOT dead. The project still multi-targets netstandard2.0, and the polyfill is reached cross-assembly via InternalsVisibleTo. Deleting it broke netstandard2.0 builds in LookupTable, ReflectionUtility, CompletionUtility, TeamCity, TeamCityAttribute (~6 sites).TryGetValue, then remove the file. Both TFMs then compile.