API

AddSingleton

Registers a service with singleton lifetime for the registration.

Formal Syntax & Structure

csharp syntaxcsharp
AddSingleton<IClock, FixedClock>()

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context.AddSingleton<IClock, FixedClock>()
C# & .NET Reference