Show / Hide Table of Contents

Class CachedServiceProviderBase

Inheritance
object
CachedServiceProviderBase
AbpLazyServiceProvider
CachedServiceProvider
TransientCachedServiceProvider
Implements
ICachedServiceProviderBase
IKeyedServiceProvider
IServiceProvider
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.DependencyInjection
Assembly: Volo.Abp.Core.dll
Syntax
public abstract class CachedServiceProviderBase : ICachedServiceProviderBase, IKeyedServiceProvider, IServiceProvider

Constructors

CachedServiceProviderBase(IServiceProvider)

Declaration
protected CachedServiceProviderBase(IServiceProvider serviceProvider)
Parameters
Type Name Description
IServiceProvider serviceProvider

Properties

CachedServices

Declaration
protected ConcurrentDictionary<ServiceIdentifier, Lazy<object?>> CachedServices { get; }
Property Value
Type Description
ConcurrentDictionary<ServiceIdentifier, Lazy<object>>

ServiceProvider

Declaration
protected IServiceProvider ServiceProvider { get; }
Property Value
Type Description
IServiceProvider

Methods

GetKeyedService(Type, object?)

Declaration
public object? GetKeyedService(Type serviceType, object? serviceKey)
Parameters
Type Name Description
Type serviceType
object serviceKey
Returns
Type Description
object

GetRequiredKeyedService(Type, object?)

Declaration
public object GetRequiredKeyedService(Type serviceType, object? serviceKey)
Parameters
Type Name Description
Type serviceType
object serviceKey
Returns
Type Description
object

GetService(Type)

Declaration
public virtual object? GetService(Type serviceType)
Parameters
Type Name Description
Type serviceType
Returns
Type Description
object

GetService(Type, Func<IServiceProvider, object>)

Declaration
public object GetService(Type serviceType, Func<IServiceProvider, object> factory)
Parameters
Type Name Description
Type serviceType
Func<IServiceProvider, object> factory
Returns
Type Description
object

GetService(Type, object)

Declaration
public object GetService(Type serviceType, object defaultValue)
Parameters
Type Name Description
Type serviceType
object defaultValue
Returns
Type Description
object

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

Declaration
public T GetService<T>(Func<IServiceProvider, object> factory)
Parameters
Type Name Description
Func<IServiceProvider, object> factory
Returns
Type Description
T
Type Parameters
Name Description
T

GetService<T>(T)

Declaration
public T GetService<T>(T defaultValue)
Parameters
Type Name Description
T defaultValue
Returns
Type Description
T
Type Parameters
Name Description
T

Implements

ICachedServiceProviderBase
Microsoft.Extensions.DependencyInjection.IKeyedServiceProvider
IServiceProvider

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform