feat: Extension migration batch 03 with utility refactoring and dependency updates - #22
Merged
Merged
Conversation
marioarce
commented
Jun 3, 2026
Owner
- Renamed utility classes for consistency: MathHelper to MathUtility, FileHelper to FileUtility
- Refactored ValidationUtility to focus on boolean validation operations
- Added new AssertionUtility for exception-throwing validation operations
- Added new StreamUtility for stream operations and manipulations
- Moved EnvironmentHelper from Helpers to Extensions.AspNetCore with .NET 8 optimizations
- Enhanced EnumerableExtensions with new filtering and ordering methods
- Improved GenericTypeExtensions documentation and XML comments
- Refactored JsonExtensions to focus on element operations
- Updated Microsoft.Extensions packages to version 8.0.0 for better compatibility
- Updated Swashbuckle.AspNetCore to version 10.2.1 in WebSample
- Updated all package documentation and README files for v0.3.0 release
- Added comprehensive unit tests for new utility classes
- Enhanced project references and dependencies across all packages
- Split validation functionality into separate AssertionUtility class - Contains methods that throw exceptions when conditions fail - Includes ArgumentNotNull, IsTrue, IsFalse, IsNotNull, ResultNotNull methods - Follows Single Responsibility Principle for better architecture - Replaces mixed assertion/validation in previous ValidationUtility
- Removed assertion methods and kept only boolean-returning validation methods - Contains IsValidEmail, IsNumeric, and IsValidUrl methods - Follows Single Responsibility Principle for validation operations - Separates concerns between assertions (exceptions) and validations (booleans) - Improves code organization and maintainability
- Renamed from FileHelper to FileUtility to follow consistent naming convention - Contains SafeReadAllText, SafeWriteAllText, and GetFileSize methods - Maintains all existing functionality with improved naming - Aligns with architectural decision to use 'Utility' suffix for general utilities - Improves discoverability and consistency across PowerCSharp.Utilities
- Renamed from MathHelper to MathUtility to follow consistent naming convention - Contains Clamp, IsInRange, Percentage, angle conversions, and parity methods - Maintains all existing mathematical functionality with improved naming - Aligns with architectural decision to use 'Utility' suffix for general utilities - Improves code organization and naming consistency across the project
- Moved from PowerCSharp.Compatibility to PowerCSharp.Utilities - Contains DisposeStreams method for safe disposal of multiple streams - No framework-specific dependencies, suitable for cross-framework use - Renamed from StreamCleanupUtility to StreamUtility for consistency - Improves architectural organization by placing general utilities correctly
- Enhanced XML documentation for FromHierarchy and CopyPropertiesTo methods - Added comprehensive parameter descriptions and return value explanations - Included practical code examples for real-world usage scenarios - Added detailed remarks section explaining behavior and edge cases - Improved method relationships and overload descriptions - Follows XML documentation best practices for better developer experience
- Added Filter method for conditional filtering of sequences - Added Order method with descending option for flexible sorting - Maintained existing FirstOrDefaultSafe, IsNullOrEmpty, and Page methods - Simplified complex filtering logic from source code for cross-framework compatibility - Improves collection manipulation capabilities without external dependencies - Provides LINQ-like functionality with simplified, framework-agnostic implementation
- Moved from PowerCSharp.Helpers to PowerCSharp.Extensions.AspNetCore.Helpers - Contains .NET 8 specific optimizations with conditional compilation - Includes GeneratedRegex attribute for improved regex performance - Provides environment variable handling and development detection - Added machine name sanitization and application version retrieval - Properly isolates framework-specific code in correct architectural location
- Removed Configure method and PrivateConstructorContractResolver - Simplified to focus only on JsonElement extension methods - Contains Get methods for safe property and element access - Maintains existing GetProperty and GetElement functionality - Improves separation of concerns by removing configuration responsibilities - Aligns with architectural decision to keep extensions focused and simple
- Updated Swashbuckle.AspNetCore package from version 10.1.7 to 10.2.1 in WebSample project
- Downgraded Microsoft.Extensions.DependencyInjection from 10.0.8 to 8.0.0 - Downgraded Microsoft.Extensions.Options from 10.0.8 to 8.0.0
- Updated version numbers across all package README files - Added detailed dependency version information - Added recent updates section for v0.3.0 - Enhanced package compatibility documentation
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.