This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A .NET 10 library (SideSoftware.Storage) providing abstractions and an Azure Blob Storage implementation for blob operations. Published as a NuGet package.
dotnet build src/Storage/Storage.csproj # Build
dotnet test tests/Storage.Tests/Storage.Tests.csproj # Run tests
dotnet pack src/Storage/Storage.csproj -o ./nupkg # Create NuGet packageSolution file uses .slnx format: SideSoftware.Storage.slnx
NuGet metadata is in src/Storage/Storage.csproj. The README.md at repo root is packed into the .nupkg via PackageReadmeFile.
One-time setup: Create an API key at https://www.nuget.org/account/apikeys (scope it to push for SideSoftware.Storage). Store it somewhere safe — you'll need it for the push command.
Steps to publish a new version:
- Bump the version in
src/Storage/Storage.csproj— update<Version>(e.g.,1.0.0→1.1.0) - Ensure tests pass:
dotnet test tests/Storage.Tests/Storage.Tests.csproj - Pack in Release mode:
dotnet pack src/Storage/Storage.csproj -c Release -o ./nupkg
- Inspect the package (optional but recommended):
unzip -l ./nupkg/SideSoftware.Storage.<VERSION>.nupkg
- Push to NuGet:
dotnet nuget push ./nupkg/SideSoftware.Storage.<VERSION>.nupkg --api-key <YOUR_API_KEY> --source https://api.nuget.org/v3/index.json
- Tag the release in git:
git tag v<VERSION> git push origin v<VERSION>
Two-layer abstraction pattern:
IBlobStorageService— General-purpose blob storage contract (upload, download, delete, list, SAS URLs, copy, exists, metadata). Implemented byAzureBlobStorageService.ICredentialDocumentStorage— Domain-specific wrapper for credential documents (pilot licenses, medical certs). Implemented byCredentialDocumentStorage, which delegates toIBlobStorageServiceusing container"credentials"and path scheme{personId}/{credentialType}/{guid}{extension}.
Namespace layout:
| Namespace | Contents |
|---|---|
SideSoftware.Storage.Abstractions |
IBlobStorageService, ICredentialDocumentStorage |
SideSoftware.Storage.Config |
BlobStorageSettings (Options pattern), UploadBlobOptions |
SideSoftware.Storage.Models |
StoredBlobInfo, BlobSasUrl, BlobSasOptions, CredentialDocumentInfo |
SideSoftware.Storage.Results |
UploadBlobResult, DownloadBlobResult |
SideSoftware.Storage.Exceptions |
BlobStorageException base + BlobNotFoundException, BlobAlreadyExistsException, BlobTooLargeException, BlobContentTypeNotAllowedException |
SideSoftware.Storage.Services |
AzureBlobStorageService |
SideSoftware.Storage |
CredentialDocumentStorage |
Key patterns:
IOptions<BlobStorageSettings>for configuration injectionIAsyncEnumerable<T>for streaming blob listings- Azure SDK
RequestFailedExceptionwith status code matching converted to domain exceptions - No DI registration extensions yet — consumers register services manually
- C# 13 / .NET 10: primary constructors, collection expressions (
[]), file-scoped namespaces - Records for all DTOs/models/results (positional for simple types, property syntax when defaults needed)
- Nullable reference types enabled
- CancellationToken parameter named
ct - Structured logging with
{PropertyName}templates andlogger.IsEnabled()guard checks StringComparer.OrdinalIgnoreCasefor content-type comparisons