C# Class Ninject.Activation.Caching.Cache

Tracks instances for re-use in certain scopes.
Inheritance: Ninject.Components.NinjectComponent, ICache
Afficher le fichier Open project: Haacked/ninject Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
Forget ( CacheEntry entry ) : void
GetEntriesCache ( HttpContext httpContext ) : CacheEntry>.Multimap
GetItemFromCache ( IContext context, object scope, CacheEntry>.Multimap entries ) : object
GetRequestScopedDisposables ( HttpContext httpContext ) : ICollection

Method Details

Cache() public méthode

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.
Résultat System

Clear() public méthode

Immediately deactivates and removes all instances in the cache, regardless of scope.
public Clear ( ) : void
Résultat void

Dispose() public méthode

Releases resources held by the object.
public Dispose ( bool disposing ) : void
disposing bool
Résultat void

DisposeRequestScoped() public méthode

Disposes request scoped IDisposable instances
public DisposeRequestScoped ( HttpContext httpContext ) : void
httpContext HttpContext
Résultat void

Prune() public méthode

Removes instances from the cache which should no longer be re-used.
public Prune ( ) : void
Résultat void

Remember() public méthode

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.
Résultat void

TryGet() public méthode

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.
Résultat object