NinjectDependencyResolver(IKernel) constructor¶
Defined in
Type: NinjectDependencyResolver
Namespace: Splat.Ninject
Assembly: Splat.Ninject.dll
Applies to
net10.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net9.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0, net8.0-ios17.5, net8.0-macos14.5, net8.0-macos14.5, net8.0-macos14.2, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-maccatalyst17.5, net8.0-ios17.5, net8.0-tvos17.2, net8.0-tvos17.2, netstandard2.1, netstandard2.1, netstandard2.0, netstandard2.0, net471, net481, net462
public NinjectDependencyResolver(IKernel kernel)
Summary: Provides an implementation of the IDependencyResolver interface using the Ninject IoC container. Enables registration, resolution, and management of service dependencies within an application.
Parameters
| Name | Type | Description |
|---|---|---|
kernel | IKernel | The Ninject kernel instance used to manage service bindings and resolve dependencies. Cannot be null. |
Remarks
This resolver integrates Ninject's binding and resolution capabilities with a standard dependency resolver interface, allowing for flexible service registration and retrieval. Thread safety is ensured for disposal operations, but individual service factories should be thread-safe if used in multi-threaded scenarios. Disposing the resolver will also dispose the underlying Ninject kernel, releasing all managed resources.