HostExtensionsAddAntPlusServices Method

Adds AntPlus services to the specified service collection.

Definition

Namespace: SmallEarthTech.AntPlus.Extensions.Hosting
Assembly: SmallEarthTech.AntPlus.Extensions.Hosting (in SmallEarthTech.AntPlus.Extensions.Hosting.dll) Version: 1.1.0.0+c05bd17c9aeef16f18715dc523820c84b7d5372d
C#
public static IServiceCollection AddAntPlusServices(
	this IServiceCollection services
)

Parameters

services  IServiceCollection
The service collection.

Return Value

IServiceCollection
The service collection with added services.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IServiceCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Use this method to add AntPlus services to the service collection when UseAntPlus() is not suitable, for example, when using a custom host builder.
C#
builder.ConfigureServices((context, services) => services.AddAntPlusServices());

See Also