Show / Hide Table of Contents

Class CachedServiceProviderBase

Inheritance
object
CachedServiceProviderBase
AbpLazyServiceProvider
CachedServiceProvider
TransientCachedServiceProvider
Implements
ICachedServiceProviderBase
System.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, IServiceProvider

Constructors

CachedServiceProviderBase(IServiceProvider)

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

Properties

CachedServices

Declaration
protected ConcurrentDictionary<Type, Lazy<object?>> CachedServices { get; }
Property Value
Type Description
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue><System.Type, System.Lazy<T><object>>

ServiceProvider

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

Methods

GetService(Type, Func<IServiceProvider, object>)

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

GetService(Type, object)

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

GetService(Type)

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

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

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

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

Implements

ICachedServiceProviderBase
System.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>>)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In This Article
Back to top Powered by Volosoft