Modified reader to accept a stream as well as a file, updated nuget, updated package references, updated to .NET 8 #29
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.
This pull request introduces significant changes to the
OldXstReaderandXstReader.Apiprojects, focusing on transitioning from manual memory management methods (e.g.,ClearContents) to implementingIDisposablefor resource cleanup, upgrading the target framework to .NET 8.0, and adding new unit tests for improved test coverage. Below is a categorized summary of the most important changes:Resource Management Improvements
ClearContentsmethod withIDisposableimplementations in classes such asXstElement,XstFolder,XstFile, andXstPropertyto streamline resource cleanup. (src/XstReader.Api/XstElement.cs,src/XstReader.Api/XstFolder.cs,src/XstReader.Api/XstFile.cs,src/XstReader.Api/XstProperty.cs) [1] [2] [3] [4]Framework Upgrade
XstExporter.PortableandXstReader.Api.Testsprojects from .NET 6.0 to .NET 8.0, enabling the use of the latest language features and runtime improvements. (src/XstExporter.Portable/XstExporter.Portable.csproj,src/XstReader.Api.Tests/XstReader.Api.Tests.csproj) [1] [2]Unit Testing Enhancements
XstReader.Api.Tests, including methods to validate opening and reading.pstfiles using theXstReaderAPI. (src/XstReader.Api.Tests/MSTestSettings.cs,src/XstReader.Api.Tests/ReadingStreamTests.cs) [1] [2]API Improvements
XstFileto accept a genericStreaminstead of aFileStream, improving flexibility for handling different stream types (e.g., memory streams, network streams). (src/XstReader.Api/XstFile.cs)Streaminstead ofFileStreamfor improved abstraction and compatibility. (src/XstReader.Api/Common/Map.cs,src/XstReader.Api/NDB.cs) [1] [2]Code Simplifications and Cleanup
ClearContentsInternaland associated logic in multiple classes, simplifying the codebase. (src/XstReader.Api/XstElement.cs,src/XstReader.Api/XstFolder.cs,src/XstReader.Api/XstMessage.cs) [1] [2] [3]These changes collectively modernize the codebase, enhance maintainability, and improve test coverage while aligning with best practices for resource management.