C# 클래스 Ninject.Activation.Caching.Cache

Tracks instances for re-use in certain scopes.
상속: Ninject.Components.NinjectComponent, ICache
파일 보기 프로젝트 열기: Haacked/ninject 1 사용 예제들

공개 메소드들

메소드 설명
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