Interface IServicesBuilder
Used for building component service dependencies.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Services
Assembly:MyTested.AspNetCore.Mvc.DependencyInjection.dll
Syntax
public interface IServicesBuilder
Methods
| Improve this Doc View SourceWith<TService>(TService)
Tries to resolve constructor service dependency of the given type.
Declaration
IAndServicesBuilder With<TService>(TService service)where TService : class
Parameters
Type | Name | Description |
---|---|---|
TService | service | Instance of service dependency to inject into the component constructor. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Services.IAndServicesBuilder | The same IServicesBuilder. |
Type Parameters
Name | Description |
---|---|
TService | Type of service dependency to resolve. |
WithNo<TService>()
Sets null value to the constructor service dependency of the given type.
Declaration
IAndServicesBuilder WithNo<TService>()where TService : class
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Services.IAndServicesBuilder | The same IServicesBuilder. |
Type Parameters
Name | Description |
---|---|
TService | Type of service dependency. |
WithSetupFor<TService>(Action<TService>)
Configures a service with scoped lifetime by using the provided System.Action delegate.
Declaration
IAndServicesBuilder WithSetupFor<TService>(Action<TService> scopedServiceSetup)where TService : class
Parameters
Type | Name | Description |
---|---|---|
System.Action<TService> | scopedServiceSetup | Action configuring the service before running the test case. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Services.IAndServicesBuilder | The same IServicesBuilder. |
Type Parameters
Name | Description |
---|---|
TService | Type of service to configure. |