Skip to content

v4.0

Latest

Choose a tag to compare

@cdervis cdervis released this 23 Jan 21:21
· 1 commit to main since this release

SharpConfig 4.0

This major update modernizes the library for the latest .NET ecosystem, improves performance, and introduces native support for multiline values.

Please note that this is a major release with breaking changes!

New Features & Enhancements

  • .NET 10 Support: Full support for .NET 10 while maintaining .NET Standard 2.0 compatibility.
  • Multiline Values: Native support for parsing and saving multiline strings using the [[ ... ]] syntax.
  • MultilineAttribute: New attribute to automatically handle multiline strings during object mapping (ToObject and FromObject).
  • Nullable Reference Types: The entire library now uses nullable reference types for improved type safety and fewer null-reference exceptions.
  • Performance Optimizations: Significant performance improvements in parsing, string handling, and setting lookups.
  • New API Methods:
    • Configuration.SaveToString(): A modern replacement for the StringRepresentation property.
    • Configuration.ResetOptions(): Resets all global configuration options to their default states.
    • Configuration.FindTypeStringConverter(): Publicly accessible converter lookups.

Breaking Changes & Deprecations

  • Nullable API: Method signatures have been updated to reflect nullability.
  • Obsolete: Configuration.StringRepresentation is now obsolete; use SaveToString() instead.
  • Removed: Setting.StringValueTrimmed has been removed (use StringValue).
  • Modernized: Legacy target frameworks (older than .NET Standard 2.0) are no longer officially supported.

Fixes

  • Optimized comment character lookups using HashSet.
  • Improved null safety in Section.Remove() and Section.ToObject().
  • Fixed edge cases when handling inline comments within section headers.
  • Refined array element separator handling across different culture settings.