-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/improve resource cleanup #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces several breaking changes and new features in preparation for version 5.0.0. The main focus is on improving testability, resource management, and request cancellation support across the client library. The most significant updates include making wrapper constructors internal, introducing a new client interface for easier mocking, implementing
IDisposablefor proper HTTP resource cleanup, and adding optionalCancellationTokenparameters to client methods.Breaking changes and API surface improvements
CustomerWrapper,ProductWrapper) can no longer be constructed directly; their constructors are now internal and require anHttpClientinstance, enforcing usage throughFacturapiClient. (FacturapiClient.cs,Wrappers/CustomerWrapper.cs,Wrappers/CatalogWrapper.cs, [1] [2] [3]IFacturapiClientinterface, allowing consumers to mock the client for testing purposes. (IFacturapiClient.cs, IFacturapiClient.csR1-R18)FacturapiClientnow implementsIDisposable. Consumers should callDispose()or use ausingstatement to ensure HTTP resources are released promptly. (FacturapiClient.cs, [1] [2]Request cancellation and async improvements
CancellationTokenparameters, enabling callers to cancel in-flight requests. (Wrappers/CustomerWrapper.cs,Wrappers/CatalogWrapper.cs, [1] [2]Wrappers/BaseWrapper.cs, [1] [2]Documentation and versioning
CHANGELOG.mdto reflect the new version (5.0.0), highlight breaking changes, and document the new features and improvements. [1] [2]