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
<PackageReference Include="KamiSama.Repositories.Xml" Version="10.0.14" />
<PackageVersion Include="KamiSama.Repositories.Xml" Version="10.0.14" />
<PackageReference Include="KamiSama.Repositories.Xml" />
paket add KamiSama.Repositories.Xml --version 10.0.14
#r "nuget: KamiSama.Repositories.Xml, 10.0.14"
#:package KamiSama.Repositories.Xml@10.0.14
#addin nuget:?package=KamiSama.Repositories.Xml&version=10.0.14
#tool nuget:?package=KamiSama.Repositories.Xml&version=10.0.14
KamiSama.Repositories.Xml
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
- KamiSama.Repositories.Xml (2 types)
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 | Versions 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. |
-
net10.0
- KamiSama.Extensions.Xml (>= 10.0.14)
- KamiSama.Repositories.Core (>= 10.0.14)
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 |