Show / Hide Table of Contents

Class ServiceCollectionCommonExtensions

Inheritance
object
ServiceCollectionCommonExtensions
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: Volo.Abp.Core.dll
Syntax
public static class ServiceCollectionCommonExtensions

Methods

BuildServiceProviderFromFactory(IServiceCollection)

Declaration
public static IServiceProvider BuildServiceProviderFromFactory(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
System.IServiceProvider

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

Declaration
public static IServiceProvider BuildServiceProviderFromFactory<TContainerBuilder>(this IServiceCollection services, Action<TContainerBuilder> builderAction = null)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
System.Action<T><TContainerBuilder> builderAction
Returns
Type Description
System.IServiceProvider
Type Parameters
Name Description
TContainerBuilder

GetRequiredService(IServiceCollection, Type)

Declaration
public static object GetRequiredService(this IServiceCollection services, Type type)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
System.Type type
Returns
Type Description
object

GetRequiredService<T>(IServiceCollection)

Declaration
public static T GetRequiredService<T>(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
T
Type Parameters
Name Description
T

GetRequiredServiceLazy(IServiceCollection, Type)

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

GetRequiredServiceLazy<T>(IServiceCollection)

Declaration
public static Lazy<T> GetRequiredServiceLazy<T>(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
System.Lazy<T><T>
Type Parameters
Name Description
T

GetServiceLazy(IServiceCollection, Type)

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

GetServiceLazy<T>(IServiceCollection)

Declaration
public static Lazy<T> GetServiceLazy<T>(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
System.Lazy<T><T>
Type Parameters
Name Description
T

GetServiceProviderOrNull(IServiceCollection)

Declaration
public static IServiceProvider GetServiceProviderOrNull(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
System.IServiceProvider

GetSingletonInstance<T>(IServiceCollection)

Declaration
public static T GetSingletonInstance<T>(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.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
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
T
Type Parameters
Name Description
T

GetTypeFinder(IServiceCollection)

Declaration
public static ITypeFinder GetTypeFinder(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
ITypeFinder

IsAdded(IServiceCollection, Type)

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

IsAdded<T>(IServiceCollection)

Declaration
public static bool IsAdded<T>(this IServiceCollection services)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services
Returns
Type Description
bool
Type Parameters
Name Description
T
In This Article
Back to top Powered by Volosoft