MY TESTED ASP.NET CORE MVC DOCS
Show / Hide Table of Contents

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 Source

With<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.
| Improve this Doc View Source

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.
| Improve this Doc View Source

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.
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX