Skip to main content
Once package icon

Once

v1.0.0Latest Stable
.NETStandard2.0

Package Description

Published
Oct 24, 2023
3y ago
Total Downloads
513
513

Install

dotnet add package Once --version 1.0.0
ProductVersions
.NET Standard
netstandard2.0

README

NuGet

A simple struct, that tracks if an event has occurred in a thread-safe manner.

var once = new Once();

...

if (!once.TryMarkOccurred())
{
    return "Event already occurred";
}

DoAnOperationThatMustOnlyHappenOnce();

return "Event occurred";

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.