C# Класс Ninject.Activation.Caching.Cache

Tracks instances for re-use in certain scopes.
Наследование: Ninject.Components.NinjectComponent, ICache
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Cache ( IPipeline pipeline, ICachePruner cachePruner ) : System

Initializes a new instance of the Cache class.

Clear ( ) : void

Immediately deactivates and removes all instances in the cache, regardless of scope.

Dispose ( bool disposing ) : void

Releases resources held by the object.

DisposeRequestScoped ( HttpContext httpContext ) : void

Disposes request scoped IDisposable instances

Prune ( ) : void

Removes instances from the cache which should no longer be re-used.

Remember ( IContext context, InstanceReference reference ) : void

Stores the specified context in the cache.

TryGet ( IContext context ) : object

Tries to retrieve an instance to re-use in the specified context.

Приватные методы

Метод Описание
Forget ( CacheEntry entry ) : void
GetEntriesCache ( HttpContext httpContext ) : CacheEntry>.Multimap
GetItemFromCache ( IContext context, object scope, CacheEntry>.Multimap entries ) : object
GetRequestScopedDisposables ( HttpContext httpContext ) : ICollection

Описание методов

Cache() публичный Метод

Initializes a new instance of the Cache class.
public Cache ( IPipeline pipeline, ICachePruner cachePruner ) : System
pipeline IPipeline The pipeline component.
cachePruner ICachePruner The cache pruner component.
Результат System

Clear() публичный Метод

Immediately deactivates and removes all instances in the cache, regardless of scope.
public Clear ( ) : void
Результат void

Dispose() публичный Метод

Releases resources held by the object.
public Dispose ( bool disposing ) : void
disposing bool
Результат void

DisposeRequestScoped() публичный Метод

Disposes request scoped IDisposable instances
public DisposeRequestScoped ( HttpContext httpContext ) : void
httpContext HttpContext
Результат void

Prune() публичный Метод

Removes instances from the cache which should no longer be re-used.
public Prune ( ) : void
Результат void

Remember() публичный Метод

Stores the specified context in the cache.
public Remember ( IContext context, InstanceReference reference ) : void
context IContext The context to store.
reference InstanceReference The instance reference.
Результат void

TryGet() публичный Метод

Tries to retrieve an instance to re-use in the specified context.
public TryGet ( IContext context ) : object
context IContext The context that is being activated.
Результат object