Soenneker.Managers.HashSaving
4.0.1297
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Managers.HashSaving --version 4.0.1297
NuGet\Install-Package Soenneker.Managers.HashSaving -Version 4.0.1297
<PackageReference Include="Soenneker.Managers.HashSaving" Version="4.0.1297" />
<PackageVersion Include="Soenneker.Managers.HashSaving" Version="4.0.1297" />
<PackageReference Include="Soenneker.Managers.HashSaving" />
paket add Soenneker.Managers.HashSaving --version 4.0.1297
#r "nuget: Soenneker.Managers.HashSaving, 4.0.1297"
#:package Soenneker.Managers.HashSaving@4.0.1297
#addin nuget:?package=Soenneker.Managers.HashSaving&version=4.0.1297
#tool nuget:?package=Soenneker.Managers.HashSaving&version=4.0.1297
Soenneker.Managers.HashSaving
Writes a precomputed hash into a repository checkout, optionally removes packaged resources, then commits and pushes the change.
Install
dotnet add package Soenneker.Managers.HashSaving
Usage
using Microsoft.Extensions.DependencyInjection;
using Soenneker.Managers.HashSaving.Abstract;
using Soenneker.Managers.HashSaving.Registrars;
services.AddHashSavingManagerAsSingleton();
IHashSavingManager hashes =
serviceProvider.GetRequiredService<IHashSavingManager>();
await hashes.SaveHashToGitRepoWithoutClearingResources(
gitDirectory: repositoryPath,
newHash: verifiedHash,
hashFileName: "hash.txt",
name: "Automation",
email: "automation@example.com",
token: githubToken,
cancellationToken);
Each method writes the hash and immediately commits and pushes all working-tree changes using the message Updates hash for new version. Use it only with a disposable, dedicated checkout whose complete contents are intended for that commit.
What you get
IHashSavingManager— Handles hashing and saving.HashSavingManagerRegistrar— Handles hashing and saving.
API at a glance
| API | What it does | Result / important behavior |
|---|---|---|
IHashSavingManager.SaveHashToGitRepoWithoutClearingResources(gitDirectory, newHash, hashFileName, name, email, token, cancellationToken) |
Saves hash To Git Repo Without Clearing Resources. | A task that completes when the hash to git repo without clearing resources has been saved. |
IHashSavingManager.SaveHashToGitRepoAsFile(gitDirectory, libraryName, newHash, fileName, hashFileName, name, email, username, token, cancellationToken) |
Saves hash To Git Repo As File. | A task that completes when the hash to git repo as file has been saved. |
IHashSavingManager.SaveHashToGitRepoAsDirectory(gitDirectory, newHash, targetDir, hashFileName, name, email, username, token, cancellationToken) |
Saves hash To Git Repo As Directory. | A task that completes when the hash to git repo as directory has been saved. |
HashSavingManagerRegistrar.AddHashSavingManagerAsSingleton(services) |
Adds IHashSavingManager as a singleton service. |
The same service collection, so additional registrations can be chained. |
HashSavingManagerRegistrar.AddHashSavingManagerAsScoped(services) |
Adds IHashSavingManager as a scoped service. |
The same service collection, so additional registrations can be chained. |
Practical notes
SaveHashToGitRepoWithoutClearingResources()leaves packaged resources in place.SaveHashToGitRepoAsFile()deletessrc/<libraryName>/Resources/<fileName>before committing.SaveHashToGitRepoAsDirectory()deletes the supplied resource directory before committing.- Hash and resource paths are required to remain inside
gitDirectory; traversal and outside paths are rejected before deletion. usernameis retained for API compatibility but is not used.nameandemailset commit attribution;tokenauthenticates the push.- Cancellation can stop the operation between local mutation, commit, and push. Run recovery or discard the dedicated checkout rather than assuming rollback.
| 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
- Soenneker.Git.Util (>= 4.0.3757)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Managers.HashSaving:
| Package | Downloads |
|---|---|
|
Soenneker.Managers.Runners
Handles Runner operations and coordination |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1349 | 0 | 9/30/2026 |
| 4.0.1348 | 0 | 9/30/2026 |
| 4.0.1347 | 0 | 9/30/2026 |
| 4.0.1346 | 0 | 9/30/2026 |
| 4.0.1345 | 22 | 9/30/2026 |
| 4.0.1344 | 40 | 9/29/2026 |
| 4.0.1343 | 1,185 | 9/29/2026 |
| 4.0.1342 | 1,327 | 9/29/2026 |
| 4.0.1341 | 62 | 9/29/2026 |
| 4.0.1340 | 41 | 9/29/2026 |
| 4.0.1339 | 1,623 | 9/28/2026 |
| 4.0.1338 | 1,335 | 9/26/2026 |
| 4.0.1337 | 2,093 | 9/25/2026 |
| 4.0.1336 | 230 | 9/25/2026 |
| 4.0.1335 | 320 | 9/25/2026 |
| 4.0.1334 | 78 | 9/25/2026 |
| 4.0.1333 | 122 | 9/25/2026 |
| 4.0.1332 | 113 | 9/25/2026 |
| 4.0.1331 | 77 | 9/25/2026 |
| 4.0.1297 | 1,675 | 9/8/2026 |
Update dependency Soenneker.Git.Util to 4.0.3757 (#1843)