JamaisVu.Framework
1.0.0-alpha4
dotnet add package JamaisVu.Framework --version 1.0.0-alpha4
NuGet\Install-Package JamaisVu.Framework -Version 1.0.0-alpha4
<PackageReference Include="JamaisVu.Framework" Version="1.0.0-alpha4" />
<PackageVersion Include="JamaisVu.Framework" Version="1.0.0-alpha4" />
<PackageReference Include="JamaisVu.Framework" />
paket add JamaisVu.Framework --version 1.0.0-alpha4
#r "nuget: JamaisVu.Framework, 1.0.0-alpha4"
#:package JamaisVu.Framework@1.0.0-alpha4
#addin nuget:?package=JamaisVu.Framework&version=1.0.0-alpha4&prerelease
#tool nuget:?package=JamaisVu.Framework&version=1.0.0-alpha4&prerelease
JamaisVu.Framework
Ensure your operations run never before-only once.
JamaisVu is a small, flexible .NET framework that lets you guard any piece of code—background jobs, message handlers, console tools, domain services—against duplicate execution, with zero pipeline magic or attributes required.
🚀 Key Features
Framework-agnostic
Call a guard anywhere in your code: worker loops, event handlers, CLI tools, domain services—no filters or middleware needed.Pluggable stores
Swap in-memory, Redis, SQL, or your own implementation by registeringIJamaisVuStorevariants via DI.Fluent, intent-driven API
Result-driven control flow:
public enum JamaisVuStatus { FirstRun, Repeated, StoreUnavailable } public sealed class JamaisVuResult { public JamaisVuStatus Status { get; init; } }
- DI-ready One extension wires up flow factories, guards and your store implementations.
⚙️ Installation
dotnet add package JamaisVu.Framework
📦 DI Configuration
using JamaisVu.Extensions;
using Microsoft.Extensions.DependencyInjection;
var builder = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services
.AddJamaisVu()
.ConfigureStores(stores =>
{
stores.AddScoped<InMemoryJamaisVuStore>();
stores.AddSingleton<RedisJamaisVuStore>();
// …add your custom stores here
});
// …other services
});
⚡ Quickstart
// inject JamaisVuGuard<YourStore> via DI
await _guard.ExecuteAsync(
key: $"invoice:{orderId}",
onFirstRunAsync: () => ProcessInvoiceAsync(orderId),
onRepeatedAsync: () => SkipProcessingAsync(orderId),
onUnavailableAsync: () => LogWarningAsync(orderId)
);
📚 API Overview
public enum JamaisVuStatus
{
FirstRun,
Repeated,
StoreUnavailable
}
public sealed class JamaisVuResult
{
public JamaisVuStatus Status { get; init; }
}
public interface IJamaisVuStore
{
Task<JamaisVuResult> EnsureAsync(string key);
}
public interface IJamaisVuFlow
{
IJamaisVuFlow For(string key);
IJamaisVuFlow OnFirstRunAsync(Func<Task> action);
IJamaisVuFlow OnRepeatedAsync(Func<Task> action);
IJamaisVuFlow OnUnavailableAsync(Func<Task> action);
Task EnsureAsync();
}
public class JamaisVuGuard<TStore> where TStore : IJamaisVuStore
{
public Task ExecuteAsync(
string key,
Func<Task> onFirstRunAsync,
Func<Task>? onRepeatedAsync = null,
Func<Task>? onUnavailableAsync = null
);
}
🔍 Why JamaisVu?
Most libraries tie idempotency to HTTP filters, messaging outboxes, or middleware. JamaisVu gives you a pure “call-where-you-need” guard, so you decide exactly which operations run once, without hidden pipelines or attributes.
📖 License
Released under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- JamaisVU.Abstractions (>= 1.0.0-alpha4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on JamaisVu.Framework:
| Package | Downloads |
|---|---|
|
JamaisVU.Extensions
DI extension methods and builder types (AddJamaisVu()/ConfigureStores(…)) to wire JamaisVu into any .NET host. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha4 | 214 | 9/23/2025 |
| 1.0.0-alpha3 | 208 | 9/22/2025 |
| 1.0.0-alpha2 | 182 | 9/5/2025 |