Table of Contents

Class CachedServiceProviderBase

Namespace
Volo.Abp.DependencyInjection
Assembly
Volo.Abp.Core.dll
public abstract class CachedServiceProviderBase : ICachedServiceProviderBase, IKeyedServiceProvider, IServiceProvider
Inheritance
CachedServiceProviderBase
Implements
Derived
Inherited Members
Extension Methods

Constructors

CachedServiceProviderBase(IServiceProvider)

protected CachedServiceProviderBase(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

Properties

CachedServices

protected ConcurrentDictionary<ServiceIdentifier, Lazy<object?>> CachedServices { get; }

Property Value

ConcurrentDictionary<ServiceIdentifier, Lazy<object>>

ServiceProvider

protected IServiceProvider ServiceProvider { get; }

Property Value

IServiceProvider

Methods

GetKeyedService(Type, object?)

public object? GetKeyedService(Type serviceType, object? serviceKey)

Parameters

serviceType Type
serviceKey object

Returns

object

GetRequiredKeyedService(Type, object?)

public object GetRequiredKeyedService(Type serviceType, object? serviceKey)

Parameters

serviceType Type
serviceKey object

Returns

object

GetService(Type)

public virtual object? GetService(Type serviceType)

Parameters

serviceType Type

Returns

object

GetService(Type, Func<IServiceProvider, object>)

public object GetService(Type serviceType, Func<IServiceProvider, object> factory)

Parameters

serviceType Type
factory Func<IServiceProvider, object>

Returns

object

GetService(Type, object)

public object GetService(Type serviceType, object defaultValue)

Parameters

serviceType Type
defaultValue object

Returns

object

GetService<T>(Func<IServiceProvider, object>)

public T GetService<T>(Func<IServiceProvider, object> factory)

Parameters

factory Func<IServiceProvider, object>

Returns

T

Type Parameters

T

GetService<T>(T)

public T GetService<T>(T defaultValue)

Parameters

defaultValue T

Returns

T

Type Parameters

T