Merged
Conversation
…ustive test suite for writer class
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR prepares the library for v1 release by enriching documentation, expanding test coverage, and resolving compiler warnings.
- Added XML documentation for many core classes and methods (e.g., VInt, StreamExtensions, DTDBase, EbmlWriter, exception types).
- Introduced extensive NUnit tests for
EbmlWritercovering constructors, string, binary, numeric, date/time, master elements, and unknown-size containers. - Added null-checks, a
Disposemethod, and updated copyright years.
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Src/Core/VInt.cs | Added XML docs for implicit conversion, equality, hash, and ToString |
| Src/Core/StreamExtensions.cs | Documented StreamExtensions class and ReadFully method |
| Src/Core/MasterBlockWriter.cs | Added Dispose() method and docs |
| Src/Core/ElementType.cs | Documented new None enum member |
| Src/Core/ElementDescriptor.cs | Added overrides (GetHashCode, Equals, ToString) with docs |
| Src/Core/EbmlWriter.cs | Updated copyright, added docs, null-check, and warning note |
| Src/Core/EbmlDataFormatException.cs | Added constructors with XML docs |
| Src/Core/DTDBase.cs | Documented factory methods, nested descriptor classes, and StandardDtd members |
| Src/Core.Tests/EbmlWriterTests.cs | Added comprehensive tests for EbmlWriter |
Comments suppressed due to low confidence (2)
Src/Core/EbmlDataFormatException.cs:31
- Parameter
causeshould be namedinnerExceptionto follow .NET conventions for wrapping exceptions.
public EbmlDataFormatException(string message, Exception cause)
Src/Core/DTDBase.cs:146
- You have consecutive
<summary>tags documenting two separate fields (CRC32andVoid) on one block. Each field should have its own XML doc header to ensure the comments attach correctly.
/// </summary>
| /// <summary> | ||
| /// Disposes the master block writer and flushes any pending data | ||
| /// </summary> | ||
| public void Dispose() |
There was a problem hiding this comment.
The class provides a Dispose method but does not implement IDisposable. Implement IDisposable so that consumers can use using blocks and tooling can detect disposable resources correctly.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This PR adds many more tests to cover reader and writer classes, adds missing documentation and fixes compiler warnings.