Nullean.Snapshots.Objects 0.18.0

dotnet add package Nullean.Snapshots.Objects --version 0.18.0
                    
NuGet\Install-Package Nullean.Snapshots.Objects -Version 0.18.0
                    
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="Nullean.Snapshots.Objects" Version="0.18.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nullean.Snapshots.Objects" Version="0.18.0" />
                    
Directory.Packages.props
<PackageReference Include="Nullean.Snapshots.Objects" />
                    
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 Nullean.Snapshots.Objects --version 0.18.0
                    
#r "nuget: Nullean.Snapshots.Objects, 0.18.0"
                    
#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 Nullean.Snapshots.Objects@0.18.0
                    
#: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=Nullean.Snapshots.Objects&version=0.18.0
                    
Install as a Cake Addin
#tool nuget:?package=Nullean.Snapshots.Objects&version=0.18.0
                    
Install as a Cake Tool

Nullean.Snapshots.Objects

snapshots.

Object-graph snapshots for Nullean.Snapshots: any object dumped by reflection as YAML, with cycles, unordered sets and throwing properties handled, so a property added to a type shows up as a diff by path.

NuGet

Install

dotnet add package Nullean.Snapshots.Objects

Quick start

using AwesomeAssertions;
using Nullean.Snapshots.Objects;

public class NavigationTests
{
	[Test]
	public void Builds() =>
		Navigation.Build(docset).Should().MatchObjectSnapshot();     // .verified.yml

	[Test]
	public void BuildsWithoutTheFileSystem() =>
		Navigation.Build(docset).Should().MatchObjectSnapshot(
			new ObjectDumpOptions().IgnoreType<IFileSystem>().IgnoreMember("Created").Render<Guid>(_ => "<guid>"));
}

Public instance properties and fields are written, maps by key, lists in order. A HashSet<T> is sorted by how its items render, so hash order does not make a diff. A reference back to an object on the path is "<cycle to $.Path>". A property that throws is "<throws InvalidOperationException>", without its message, which differs between operating systems.

Trimming and native AOT

This package reads members by reflection, so the call is marked [RequiresUnreferencedCode]. It still works under native AOT if the trimmer is told which types to keep: the root type is kept for you, name every other type in the graph with Include<T>(). A type without public members that was not named fails with a message that says so, instead of silently dumping as {}. Interfaces are not consulted to find sets (trimming removes them from a type's interface list), so a custom set type needs SortAsSet(typeof(MySet<>)). See DECISIONS.md in the repository for the AOT run this was checked with.

Documentation: https://snapshots.nullean.net/formats/objects/

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.18.0 0 11/17/2026
0.17.0 0 11/17/2026