KamiSama.Repositories.Xml 10.0.14

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

KamiSama.Repositories.Xml

Back to package index

Version: 10.0.0

Description

Read-oriented XML directory repositories that load one entity per file into memory. Version 10.0.0 has an incompatible default serializer and a broken mutation path, so use these types only for reads with an explicit per-entity serializer.

How to use

dotnet add package KamiSama.Repositories.Xml --version 10.0.0

Treat both XML repository classes as read-only in version 10.0.0. Store one entity per *.xml file, pass a serializer for one entity because the default array serializer cannot read those files, and make the mapping return each exact file name:

using System.Xml.Serialization;
using KamiSama.Repositories.Xml;

var serializer = new XmlSerializer(typeof(User));
using var repository = new XmlDirectoryRepository<User>(
    "data/users", user => $"{user.Id}.xml", serializer, UserIdComparer.Instance);

User? user = await repository.FindAsync(x => x.Id == userId, cancellationToken);

Do not call add, update, or delete expecting persistence. Both implementations write to the directory path instead of mapped entity files, ignore the supplied serializer while saving, and never delete stale files; failures are raised through SaveFailed after in-memory changes and otherwise suppressed. A single invalid or misnamed file fails the whole load, equal entities from separate files are silently collapsed, queries are live, and locking does not coordinate multiple instances or processes.

Namespaces

Types

  • KamiSama.Repositories.Xml.XmlDirectoryRepository<TEntity> - Loads one XML entity per file from a directory for read-oriented access. In version 10.0.0 the default serializer cannot read the per-entity files and mutation writes to the directory path rather than mapped files, so pass a per-entity serializer and do not rely on add, update, or delete for persistence.
  • KamiSama.Repositories.Xml.XmlFileRepository<TEntity> - Loads one XML entity per file from a directory for read-oriented access. In version 10.0.0 the default serializer cannot read the per-entity files and mutation writes to the directory path rather than mapped files, so pass a per-entity serializer and do not rely on add, update, or delete for persistence.
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. 
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
10.0.14 86 11/8/2026
10.0.13.1 107 10/22/2026
10.0.13 109 10/22/2026
10.0.11.9 147 8/24/2026
10.0.11.8 133 8/22/2026
10.0.11.7 144 8/21/2026
10.0.11.6 119 8/19/2026
10.0.11.5 129 8/18/2026
10.0.11.4 133 8/18/2026
10.0.11.3 122 8/18/2026
10.0.11.2 128 8/18/2026
10.0.11.1 139 8/15/2026
10.0.11 143 8/11/2026
10.0.10.2 151 8/4/2026
10.0.10.1 143 7/31/2026
10.0.10 143 7/30/2026
10.0.9 150 6/20/2026
10.0.7 145 5/1/2026
10.0.6 148 4/16/2026
10.0.1 288 11/26/2025
Loading failed