WinterRose.WinterForge 25.2.21

There is a newer version of this package available.
See the version list below for details.
dotnet add package WinterRose.WinterForge --version 25.2.21
                    
NuGet\Install-Package WinterRose.WinterForge -Version 25.2.21
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WinterRose.WinterForge" Version="25.2.21" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WinterRose.WinterForge" Version="25.2.21" />
                    
Directory.Packages.props
<PackageReference Include="WinterRose.WinterForge" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WinterRose.WinterForge --version 25.2.21
                    
#r "nuget: WinterRose.WinterForge, 25.2.21"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WinterRose.WinterForge@25.2.21
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WinterRose.WinterForge&version=25.2.21
                    
Install as a Cake Addin
#tool nuget:?package=WinterRose.WinterForge&version=25.2.21
                    
Install as a Cake Tool

Stream-Based Object Serialization and Deserialization � WinterForge

WinterForge is a high-performance, human-readable object serialization framework designed to adapt fluidly to project needs rather than forcing projects to conform to its rules. It blends speed with developer clarity by offering a dual format system that supports both human-readable text and opcode-based intermediate representation for maximum performance.

Slight disclaimer I work on this package alone and on my free time. updates may be slow. Contact me on discord 'thesnowowl' if you want to get into contact with me. be it in interest in usage of WinterForge, contribution, or other packages made by me, all folks are welcome!

Core Features

  • Stream-based I/O:

    • Utilizes IO.Stream for serialization and deserialization, enabling flexible storage and transfer.
  • Dictionaries with Arbitrary Keys and Values:

    • Supports Dictionary<TKey, TValue> with any object as TKey or TValue.
    • Nested dictionaries, lists, and combinations are fully supported.
  • Dual Format System:

    • Human-readable text: Easy for developers to read, debug, diff, and edit manually.
    • Opcode intermediate representation: Structured sequential opcodes for fast, optimized serialization cycles.
  • Comprehensive Type Support:

    • Primitive types (int, float, bool, string, etc.) with full typename transcription.
    • Anonymous types: Supports serialization and deserialization of inline, unnamed objects, including nested anonymous types.
    • Nested objects, enums, lists, arrays, and nullable types.
    • Static classes, fields, and properties.
  • Attribute-Driven Control:

    • Inclusion/exclusion of fields and properties using attributes.
    • Hooks on instance methods for lifecycle events:
      • BeforeSerialize
      • BeforeDeserialize
      • AfterDeserialize
    • Hooks can be asynchronous (async Task). by default they are fired and forgotten, but optionally they can be awaited before the serialization or deserialization process continues.
  • Advanced Object Handling:

    • Object reference ID system with aliasing and stack-based referencing for reuse.
    • Ability to call methods during deserialization, using return values dynamically.
    • Custom value providers via CustomValueProvider<T> for type-specific value control, without manual registration.
    • Supports both structs and classes.
  • Progress and Formatting:

    • Abstract progress tracking system (useful for loading bars, UI feedback).
    • Formatting modes controlled by TargetFormat enum:
      • HumanReadable
      • IndentedHumanReadable
      • Opcodes
    • Automatic conversion between human-readable and opcode formats.
  • Smart Type Discovery and Reflection:

    • Dynamically discovers types and members.
    • Supports runtime variables and integration with reflection helpers.

Design Philosophy

  • Performance + Developer Clarity:
    Optimized to serialize thousands of objects in milliseconds while maintaining human readability for easier debugging and version control.

  • Structure-First Approach:
    Data is always read in the order it is written, ensuring deterministic and reliable serialization.

Current Limitations & Future Plans

  • Upcoming features:
    • Support for math and boolean expressions within serialized data.
    • Importing and including other WinterForge files/modules.
    • Templates and repeatable code blocks.
    • Conditional serialization and expression support.

License

You can find the license details here.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on WinterRose.WinterForge:

Package Downloads
WinterRose

A library made mostly for personal use. distribution without consent of the Author is strictly forbidden

WinterRose.Monogame.Modding

Provides a way of making mod 'items' in your games. made for WinterRose.Monogame, but may work in other environments. this does NOT provide a means to make 'programmed' mods. instead this is a kind of mod that applies to an ingame item to alter its stats its very customizable

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
25.2.25 133 7/7/2025
25.2.24 132 7/7/2025
25.2.23 98 7/4/2025
25.2.22 149 7/3/2025
25.2.21 131 7/2/2025
25.2.20 135 7/2/2025
25.2.19 134 7/2/2025
25.2.19-alpha-6 128 7/1/2025
25.2.19-alpha-5 131 7/1/2025
25.2.19-alpha-4 128 7/1/2025
25.2.19-alpha-3 137 6/24/2025
25.2.19-alpha-2 138 6/19/2025
25.2.19-alpha 133 6/19/2025
25.2.18 143 6/14/2025
25.2.17 175 6/13/2025
25.2.16 177 6/13/2025
25.2.15 196 6/13/2025
25.2.14 93 5/30/2025
25.2.13 86 5/30/2025
25.2.12 88 5/30/2025
25.2.11 115 5/30/2025
25.2.10 139 5/29/2025
25.2.9 161 5/26/2025
25.2.8 139 5/25/2025
25.2.7 139 5/25/2025
25.2.6 142 5/25/2025
25.2.5 103 5/23/2025
25.2.4 108 5/23/2025
25.2.3 224 5/15/2025
25.2.2 144 5/4/2025
25.2.1 142 5/4/2025
25.2.0 139 5/4/2025

Dictionary support is now fully functional

Flow hooks can now be awaited, before they could be async, but were a "fire and forget" kind of async. now they can optionally be awaited by specifying it in the attribute as a named paramter "IsAwaited". that parameter is only used if the flow hook method returns "async Task"

Enums are now a first class feature in WinterForge!
before it was something like
YourEnumType : 0 {
   value__ = 0;
}
foo = _ref(0);

but now, its as simle as:
foo = YourEnumType.Bar;

HOTIX: Enums flagged with [Flags] are now also supported under the syntax
foo = Bar.Fass | Xata | Lohk;