Skip to content

More code cleanup - #1711

Merged
clairernovotny merged 12 commits into
mainfrom
code-cleanup
Mar 7, 2025
Merged

clairernovotny merged 12 commits into
mainfrom
code-cleanup

Conversation

@clairernovotny

Copy link
Copy Markdown
Member

PR Classification

Code cleanup and improvements to enhance readability, maintainability, and type safety.

PR Summary

This pull request refactors several files to improve code clarity, enforce nullability, and update data structures for better performance. Key changes include:

  • AssemblyDebugParser.cs: Refactored to use List<T> and added nullability checks.
  • StreamExtensions.cs: Updated ReadAllBytes to use ReadExactly for improved robustness.
  • AppVersionTelemetryInitializer.cs: Changed _properties to be readonly for better encapsulation.
  • DictionaryExtensions.cs: Updated methods to handle nullable types, enhancing type safety.
  • FeedPackagePickerViewModel.cs: Constructor updated to handle nullable parameters and improved refresh logic.

@github-actions

github-actions Bot commented Mar 6, 2025

Copy link
Copy Markdown

Updated `Directory.Build.props` to enable implicit usings and enhanced nullability checks. Removed `netcoreapp3.1` specific properties from `Directory.Build.targets` and added an `ItemGroup` to eliminate conflicting using directives.
- Added `CultureInfo.CurrentCulture` to string formatting methods for better localization support.
- Refactored several classes to use nullable reference types, improving type safety and robustness.
- Updated `DownloadPackage` method for better readability and async/await consistency.
- Cleaned up `using` directives and improved organization across multiple files.
- Restructured `NuspecMetadata.Schema.cs` with partial classes for better maintainability.
@github-actions

github-actions Bot commented Mar 7, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Mar 7, 2025

Copy link
Copy Markdown

1 similar comment
@github-actions

github-actions Bot commented Mar 7, 2025

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Mar 7, 2025

Copy link
Copy Markdown

- Cleaned up unnecessary using directives and organized imports.
- Updated string handling to use modern techniques, including the range operator.
- Enhanced type safety by implementing nullable reference types in properties and method signatures.
- Improved error handling with null checks in view model creation methods.
- Ensured property initializations are non-null using the null-forgiving operator.
- Updated interface method signatures to return nullable types for clarity.
- Refactored methods for improved clarity and efficiency in package processing.
- Made UI-related code adjustments to prevent potential runtime errors with null checks.
- Added and modified comments for better documentation and maintainability.
@github-actions

github-actions Bot commented Mar 7, 2025

Copy link
Copy Markdown

This commit modifies several class definitions to be `partial` for trimming and WinRT ABI
@github-actions

github-actions Bot commented Mar 7, 2025

Copy link
Copy Markdown

@clairernovotny
clairernovotny merged commit 8696633 into main Mar 7, 2025
@clairernovotny
clairernovotny deleted the code-cleanup branch March 7, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant