C# 클래스 Ninject.Activation.Blocks.ActivationBlock

A block used for deterministic disposal of activated instances. When the block is disposed, all instances activated via it will be deactivated.
상속: DisposableObject, IActivationBlock
파일 보기 프로젝트 열기: ninject/Ninject 1 사용 예제들

공개 메소드들

메소드 설명
ActivationBlock ( IResolutionRoot parent ) : System

Initializes a new instance of the ActivationBlock class.

CanResolve ( IRequest request ) : bool

Determines whether the specified request can be resolved.

CanResolve ( IRequest request, bool ignoreImplicitBindings ) : bool

Determines whether the specified request can be resolved.

CreateRequest ( Type service, bool>.Func constraint, IEnumerable parameters, bool isOptional, bool isUnique ) : IRequest

Creates a request for the specified service.

Inject ( object instance ) : void

Injects the specified existing instance, without managing its lifecycle.

Release ( object instance ) : bool

Deactivates and releases the specified instance if it is currently managed by Ninject.

Resolve ( IRequest request ) : IEnumerable

Resolves instances for the specified request. The instances are not actually resolved until a consumer iterates over the enumerator.

메소드 상세

ActivationBlock() 공개 메소드

Initializes a new instance of the ActivationBlock class.
public ActivationBlock ( IResolutionRoot parent ) : System
parent IResolutionRoot The parent resolution root.
리턴 System

CanResolve() 공개 메소드

Determines whether the specified request can be resolved.
public CanResolve ( IRequest request ) : bool
request IRequest The request.
리턴 bool

CanResolve() 공개 메소드

Determines whether the specified request can be resolved.
public CanResolve ( IRequest request, bool ignoreImplicitBindings ) : bool
request IRequest The request.
ignoreImplicitBindings bool if set to true implicit bindings are ignored.
리턴 bool

CreateRequest() 공개 메소드

Creates a request for the specified service.
public CreateRequest ( Type service, bool>.Func constraint, IEnumerable parameters, bool isOptional, bool isUnique ) : IRequest
service System.Type The service that is being requested.
constraint bool>.Func The constraint to apply to the bindings to determine if they match the request.
parameters IEnumerable The parameters to pass to the resolution.
isOptional bool True if the request is optional; otherwise, false.
isUnique bool True if the request should return a unique result; otherwise, false.
리턴 IRequest

Inject() 공개 메소드

Injects the specified existing instance, without managing its lifecycle.
public Inject ( object instance ) : void
instance object The instance to inject.
리턴 void

Release() 공개 메소드

Deactivates and releases the specified instance if it is currently managed by Ninject.
public Release ( object instance ) : bool
instance object The instance to release.
리턴 bool

Resolve() 공개 메소드

Resolves instances for the specified request. The instances are not actually resolved until a consumer iterates over the enumerator.
public Resolve ( IRequest request ) : IEnumerable
request IRequest The request to resolve.
리턴 IEnumerable