develop #7
Reference in New Issue
Block a user
No description provided.
Delete Branch "develop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Major refactoring of the PS.IPAM C# class library to improve code quality, maintainability, and follow C# best practices.
Key Changes:
Model classes converted to C# records - Address, Subnetwork, Vlan, Vrf, Section, Tag, Domain, Session now use concise record syntax with immutable properties
Enum naming conventions fixed - All enums now use PascalCase (ApiController, ApiSubController, ModelType, AuthType)
New SessionStatus enum - Replaces magic strings ("NoToken", "Expired", "Valid") with strongly-typed enum values
Base cmdlet class extracted - BaseCmdlet provides shared functionality (WriteResult, ConvertCustomFields, ExecuteAsync) eliminating code duplication across 20 cmdlets
RequestHelper refactored - Split into smaller methods, added HttpMethod-based overload, improved error handling
SessionManager improved - Renamed methods to follow async naming conventions, added XML documentation
Removed unnecessary inheritance - Vlan no longer inherits from DynamicObject
Test plan
All 114 unit tests pass
Build succeeds for both classlib and classlib.tests projects
Manual testing of cmdlets against a phpIPAM instance
Verify PowerShell module loads correctly with Import-Module