- Reduce LINQ overhead by replacing SingleOrDefault and filtering logic with manual iteration.
- Use HashSet and case-insensitive comparisons for faster lookups.
Both of these changes resolve a number of HAA0401 warnings:
Possible allocation of reference type enumerator; non-ValueType enumerator may result in a heap allocation.
Value type to reference type conversion causes boxing at call site, and unboxing at the callee-site. Resolves by explicitly converting value to string before including it in a log message string.
A class declaration included the new keyword even though the declaration does not override an existing declaration in a base class. The new keyword can be deleted.