I have a rudimentary implementation on my branch:
http://github.com/fschwiet/ninject
It works best for dependencies that map to a service where Ninject
instantiates it, as in that case it has the name of the service to
show. Rather then the standard kernel, you need to use
DependencyGraphingKernel().
You can then do something like this to print the graph:
public void WriteDependencyGraph(DependencyGraphingKernel
kernel, System.IO.TextWriter writer)
{
DependencyGraphTraversal.VisitGraph(kernel.LoadSupportedServices(),
new PrintingDependencyGraphVisitor(writer));
}
Here is some sample output:
ResetPasswordController
FormsAuthentication (IFormsAuthentication)
UserService (IUserService)
ResetPasswordService (IResetPasswordService)
GuidGenerator (IGuidGenerator)
UserEmailer (IUserEmailer)
SitePolicy (ISitePolicy)
ConstantProvider{Object} (ISiteInfo)
TemplateRepository (ITemplateRepository)
UserService (IUserService)
Mail (IMail)
ResetPasswordRoutes (IResetPasswordRoutes)
SiteInfoExtensions (ISiteInfoExtensions)
ConstantProvider{Object} (ISiteInfo)
On Aug 27, 4:57 am, "
PiotrOws...@gmail.com" <
piotrows...@gmail.com>
wrote: