Fix ~3500 analyser issues
Summary
This PR addresses a wide range of analyzer issues and includes minor performance optimizations.
Changes
- Fixed numerous code analyzer warnings (e.g., CA1822, CA1855, CA1859, CA1862, CA2211, CA1016, CA1816, CA1872).
- Resolved IDE suggestions and style issues (e.g., IDE0057, IDE0054, IDE0033, IDE0059, IDE0062, IDE0090, IDE0306, IDE0350, IDE1006, IDE0130).
- Simplified object initializations, null assignments, and usings.
- Refactored serialization logic and method parameters for clarity.
- Improved exception handling in
SDL2JoyCon.cs
. - Applied pattern matching and readonly optimizations.
- Updated
.editorconfig
to reflect code style preferences. - Removed unused variables and suppressions.
Benefits
- Codebase is cleaner and aligns with modern C# practices.
- Slight performance improvements (e.g., using
char
instead ofstring
). - Easier maintainability and better compliance with static analysis tools.