Host ExtensionsAdd Ant Plus Services 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: 2.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
The service collection with added services.
Assembly: SmallEarthTech.AntPlus.Extensions.Hosting (in SmallEarthTech.AntPlus.Extensions.Hosting.dll) Version: 2.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
C#
public static IServiceCollection AddAntPlusServices(
this IServiceCollection services
)VB
<ExtensionAttribute>
Public Shared Function AddAntPlusServices (
services As IServiceCollection
) As IServiceCollectionC++
public:
[ExtensionAttribute]
static IServiceCollection^ AddAntPlusServices(
IServiceCollection^ services
)F#
[<ExtensionAttribute>]
static member AddAntPlusServices :
services : IServiceCollection -> IServiceCollection Parameters
- services IServiceCollection
- The service collection.
Return Value
IServiceCollectionThe 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());