Show / Hide Table of Contents

Class ServiceCollectionCommonExtensions

Inheritance
System.Object
ServiceCollectionCommonExtensions
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Volo.Abp.Core.dll
Syntax
public static class ServiceCollectionCommonExtensions : object

Methods

BuildServiceProviderFromFactory(IServiceCollection)

Declaration
public static IServiceProvider BuildServiceProviderFromFactory(this IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceProvider

BuildServiceProviderFromFactory<TContainerBuilder>(IServiceCollection, Action<TContainerBuilder>)

Declaration
public static IServiceProvider BuildServiceProviderFromFactory<TContainerBuilder>(this IServiceCollection services, Action<TContainerBuilder> builderAction = null)
Parameters
Type Name Description
IServiceCollection services
Action<TContainerBuilder> builderAction
Returns
Type Description
IServiceProvider
Type Parameters
Name Description
TContainerBuilder

GetRequiredServiceLazy(IServiceCollection, Type)

Returns a to resolve a service from given once dependency injection registration phase completed.

Declaration
public static Lazy<object> GetRequiredServiceLazy(this IServiceCollection services, Type type)
Parameters
Type Name Description
IServiceCollection services
Type type
Returns
Type Description
Lazy<System.Object>

GetRequiredServiceLazy<T>(IServiceCollection)

Returns a to resolve a service from given once dependency injection registration phase completed.

Declaration
public static Lazy<T> GetRequiredServiceLazy<T>(this IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
Lazy<T>
Type Parameters
Name Description
T

GetServiceLazy(IServiceCollection, Type)

Returns a to resolve a service from given once dependency injection registration phase completed.

Declaration
public static Lazy<object> GetServiceLazy(this IServiceCollection services, Type type)
Parameters
Type Name Description
IServiceCollection services
Type type
Returns
Type Description
Lazy<System.Object>

GetServiceLazy<T>(IServiceCollection)

Returns a to resolve a service from given once dependency injection registration phase completed.

Declaration
public static Lazy<T> GetServiceLazy<T>(this IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
Lazy<T>
Type Parameters
Name Description
T

GetSingletonInstance<T>(IServiceCollection)

Declaration
public static T GetSingletonInstance<T>(this IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
T
Type Parameters
Name Description
T

GetSingletonInstanceOrNull<T>(IServiceCollection)

Declaration
public static T GetSingletonInstanceOrNull<T>(this IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
T
Type Parameters
Name Description
T

IsAdded(IServiceCollection, Type)

Declaration
public static bool IsAdded(this IServiceCollection services, Type type)
Parameters
Type Name Description
IServiceCollection services
Type type
Returns
Type Description
System.Boolean

IsAdded<T>(IServiceCollection)

Declaration
public static bool IsAdded<T>(this IServiceCollection services)
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T
Back to top Powered by Volosoft