I am introducing Ninject into a big mess of an existing project. I want to write a diagnostic test to make sure that all Ninject classes will eventually be created, Ninject can actually be resolved ... without actually creating any of them.
The reason I want to avoid the actual construct is because many of these classes tend to run database operations in their constructors (sigh, yes, I know). Otherwise, I would just run them through Get<T>with try / catch
Get<T>
CanResolve IResolutionRoot (.. Kernel, using ). CreateRequest, . , .
CanResolve
IResolutionRoot
Kernel
using
CreateRequest
, , , , , , Ninject get() .
Ninject 3.0.2 CanResolve, :
kernel.CanResolve<T>()
3.0.2 nuget, (Ninject.3.0.2-unstable-9037), , .