perf: lightweight performance fixes (CA1859, CA1869, CA1308, CA2012, CA1819, CA5392) - #160
Merged
Merged
Conversation
DeepDiver1975
commented
Aug 30, 2026
Collaborator
- CA1859 (3): IncidentStore._fileStore typed as IncidentFileStore; AtemschutzTrupp.ValidateCrew takes List (Register already passes members.ToList()); MasterDataStore.SettingsRows returns (string Key, int Value)[] instead of IEnumerable.
- CA1869 (1): MasterDataJson caches a single static JsonSerializerOptions instead of allocating one per Serialize call.
- CA1308 (1): FilesViewModel.ContentTypeFor normalizes extension with ToUpperInvariant (arms uppercased).
- CA2012 (1): MainWindowViewModel awaits ws.LeaveAsync() in the GoHome action instead of discarding the ValueTask (async void lambda, matching the Action-typed event semantics).
- CA5392 (1): SystemAlarmService.PlaySound gets DefaultDllImportSearchPaths(System32).
- CA1819 (1): AddFileCommand.Bytes suppressed with justification — byte[] is the wire form System.Text.Json base64-encodes.
- Verification: AnalysisMode=All harness shows all six rules at 0, zero errors, no other rule delta vs main; full suite 801 passed / 1 skipped (unchanged).
… CA1869, CA1308, CA2012, CA1819, CA5392) Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
DeepDiver1975
force-pushed
the
fix/analyzer-perf-minors
branch
from
August 30, 2026 21:07
2f54692 to
dc3dbc9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.