C# 클래스 Ninject.KernelBase

상속: BindingRoot, IKernel
파일 보기 프로젝트 열기: ninject/Ninject 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
AddBinding ( IBinding binding ) : void

Registers the specified binding.

BeginBlock ( ) : IActivationBlock

Begins a new activation block, which can be used to deterministically dispose resolved instances.

BuildReadonlyKernel ( ) : IReadOnlyKernel
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.

Dispose ( bool disposing ) : void

Releases resources held by the object.

GetBindings ( Type service ) : IEnumerable

Gets the bindings registered for the specified service.

GetModules ( ) : IEnumerable

Gets the modules that have been loaded into the kernel.

GetService ( Type serviceType ) : object
HasModule ( string name ) : bool

Determines whether a module with the specified name has been loaded in the kernel.

Inject ( object instance ) : void

Injects the specified existing instance, without managing its lifecycle.

Load ( IEnumerable assemblies ) : void

Loads modules defined in the specified assemblies.

Load ( IEnumerable m ) : void

Loads the module(s) into the kernel.

Load ( IEnumerable filePatterns ) : void

Loads modules from the files that match the specified pattern(s).

Release ( object instance ) : bool

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

RemoveBinding ( IBinding binding ) : void

Unregisters the specified binding.

Resolve ( IRequest request ) : IEnumerable

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

Unbind ( Type service ) : void

Unregisters all bindings for the specified service.

Unload ( string name ) : void

Unloads the plugin with the specified name.

보호된 메소드들

메소드 설명
KernelBase ( ) : System

Initializes a new instance of the KernelBase class.

KernelBase ( IComponentContainer components, INinjectSettings settings ) : System

Initializes a new instance of the KernelBase class.

KernelBase ( INinjectSettings settings ) : System

Initializes a new instance of the KernelBase class.

메소드 상세

AddBinding() 공개 메소드

Registers the specified binding.
public AddBinding ( IBinding binding ) : void
binding IBinding The binding to add.
리턴 void

BeginBlock() 공개 메소드

Begins a new activation block, which can be used to deterministically dispose resolved instances.
public BeginBlock ( ) : IActivationBlock
리턴 IActivationBlock

BuildReadonlyKernel() 공개 메소드

public BuildReadonlyKernel ( ) : IReadOnlyKernel
리턴 IReadOnlyKernel

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

Dispose() 공개 메소드

Releases resources held by the object.
public Dispose ( bool disposing ) : void
disposing bool True if called manually, otherwise by GC.
리턴 void

GetBindings() 공개 메소드

Gets the bindings registered for the specified service.
public GetBindings ( Type service ) : IEnumerable
service System.Type The service in question.
리턴 IEnumerable

GetModules() 공개 메소드

Gets the modules that have been loaded into the kernel.
public GetModules ( ) : IEnumerable
리턴 IEnumerable

GetService() 공개 메소드

public GetService ( Type serviceType ) : object
serviceType System.Type
리턴 object

HasModule() 공개 메소드

Determines whether a module with the specified name has been loaded in the kernel.
public HasModule ( string name ) : bool
name string The name of the module.
리턴 bool

Inject() 공개 메소드

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

KernelBase() 보호된 메소드

Initializes a new instance of the KernelBase class.
protected KernelBase ( ) : System
리턴 System

KernelBase() 보호된 메소드

Initializes a new instance of the KernelBase class.
protected KernelBase ( IComponentContainer components, INinjectSettings settings ) : System
components IComponentContainer The component container to use.
settings INinjectSettings The configuration to use.
리턴 System

KernelBase() 보호된 메소드

Initializes a new instance of the KernelBase class.
protected KernelBase ( INinjectSettings settings ) : System
settings INinjectSettings The configuration to use.
리턴 System

Load() 공개 메소드

Loads modules defined in the specified assemblies.
public Load ( IEnumerable assemblies ) : void
assemblies IEnumerable The assemblies to search.
리턴 void

Load() 공개 메소드

Loads the module(s) into the kernel.
public Load ( IEnumerable m ) : void
m IEnumerable The modules to load.
리턴 void

Load() 공개 메소드

Loads modules from the files that match the specified pattern(s).
public Load ( IEnumerable filePatterns ) : void
filePatterns IEnumerable The file patterns (i.e. "*.dll", "modules/*.rb") to match.
리턴 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

RemoveBinding() 공개 메소드

Unregisters the specified binding.
public RemoveBinding ( IBinding binding ) : void
binding IBinding The binding to remove.
리턴 void

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

Unbind() 공개 메소드

Unregisters all bindings for the specified service.
public Unbind ( Type service ) : void
service System.Type The service to unbind.
리턴 void

Unload() 공개 메소드

Unloads the plugin with the specified name.
public Unload ( string name ) : void
name string The plugin's name.
리턴 void