You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Adopt nullable types and modern C# conventions
Modernized the codebase by adopting nullable reference types (`string?`, `XPathExpression?`, etc.) to improve null safety and align with modern C# practices. Updated null checks to use `is not null` for better readability.
Introduced default initialization for properties (e.g., `Schema.Empty`, `NullMatchedNodes.Instance`) and added sentinel values to replace nulls in certain cases. Improved null handling in methods by throwing exceptions when required fields are uninitialized.
Refactored the `Reset` method for clarity, reused `StringBuilder` instances to improve memory efficiency, and guarded against nulls with the null-forgiving operator (`!`) where appropriate.
Enhanced dictionary merging logic for clarity, added `[MemberNotNull]` attributes to guarantee non-null fields after method execution, and improved conditional logic readability.
Refactored validation logic in `Validator` to simplify error handling and replaced nullable `StringBuilder` instances with string variables. Applied general code cleanup, including consistent formatting and spacing, to improve maintainability.
0 commit comments