Skip to content

Class DiUsageExample

Namespace: Belay.Extensions.Examples
Assembly: Belay.Extensions.dll

Example showing how to use Belay.NET with dependency injection.

csharp
public static class DiUsageExample

Inheritance

objectDiUsageExample

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Methods

ConfigureWebApplication(IServiceCollection, IConfiguration)

Example of setting up Belay.NET with ASP.NET Core. Note: Requires Microsoft.Extensions.Hosting and Microsoft.AspNetCore.App packages.

RunConsoleExample()

Example of setting up Belay.NET with dependency injection in a console application. Note: In a real application you would add logging and use a proper hosting framework.

Released under the Apache License 2.0.