Class ServiceCollectionShouldlyExtensions
Inheritance
object
ServiceCollectionShouldlyExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: AbpTestBase.dll
Syntax
public static class ServiceCollectionShouldlyExtensions
Methods
ShouldContain(IServiceCollection, Type, Type, ServiceLifetime)
Declaration
public static void ShouldContain(this IServiceCollection services, Type serviceType, Type implementationType, ServiceLifetime lifetime)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
| System.Type | serviceType | |
| System.Type | implementationType | |
| Microsoft.Extensions.DependencyInjection.ServiceLifetime | lifetime |
ShouldContainScoped(IServiceCollection, Type, Type)
Declaration
public static void ShouldContainScoped(this IServiceCollection services, Type serviceType, Type implementationType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
| System.Type | serviceType | |
| System.Type | implementationType |
ShouldContainSingleton(IServiceCollection, Type, Type)
Declaration
public static void ShouldContainSingleton(this IServiceCollection services, Type serviceType, Type implementationType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
| System.Type | serviceType | |
| System.Type | implementationType |
ShouldContainTransient(IServiceCollection, Type, Type)
Declaration
public static void ShouldContainTransient(this IServiceCollection services, Type serviceType, Type implementationType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
| System.Type | serviceType | |
| System.Type | implementationType |
ShouldNotContainService(IServiceCollection, Type)
Declaration
public static void ShouldNotContainService(this IServiceCollection services, Type serviceType)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Extensions.DependencyInjection.IServiceCollection | services | |
| System.Type | serviceType |