Skip to content

Conversation

@PTKu
Copy link
Contributor

@PTKu PTKu commented Mar 6, 2025

This pull request includes several changes to the Directory.Packages.props file and the AXSharp.Connector.S71500.WebAPI project to update package versions and refactor the codebase. The most significant changes include updating package versions, removing unused code, and refactoring the WebApiConnector class for improved readability and maintainability.

Package Version Updates:

  • Updated Microsoft.Extensions.DependencyInjection.Abstractions to version 9.0.2 for both net9.0 and net8.0 target frameworks in Directory.Packages.props. [1] [2]
  • Updated Siemens.Simatic.S7.Webserver.API to version 3.2.1 in Directory.Packages.props.

Code Removal:

  • Removed the ApiRequestsExtensions class from ApiRequestsExtensions.cs as it was no longer needed.

Refactoring:

  • Refactored the WebApiConnector class in WebApiConnector.cs to improve readability and maintainability:
    • Introduced ApiRequestSplitterByBytes for request handling. [1] [2]
    • Simplified property and method implementations, including RequestHandler and AntiThrottling. [1] [2]
    • Improved exception handling and logging in HandleCommFailure method.
    • Replaced explicit type declarations with var where appropriate. [1] [2]
    • Simplified RetryPolicy initialization.
    • Refined ReadBatchAsync and WriteBatchAsync methods to streamline the request processing logic. [1] [2]

PTKu added 2 commits March 4, 2025 09:41
Updated Siemens.Simatic.S7.Webserver.API package to 3.2.1 and
re-enabled its reference. Removed project reference to
Webserver.API.csproj. Refactored WebApiConnector for improved
readability and performance, including adding an
ApiRequestSplitterByBytes instance that replaces the existing message splitting in this project.
@PTKu PTKu marked this pull request as ready for review March 6, 2025 06:36
@PTKu PTKu merged commit 8fe98fe into dev Mar 6, 2025
2 checks passed
@PTKu PTKu deleted the sandbox-bulkaccess-web-api-max branch March 6, 2025 06:36
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.

2 participants