title: Visualizing dependency tree depth in autofac
body: <p>I may have been searching for the wrong stuff, looking in the wrong boxes. But I can't seem to find a good way to visualize how deep my dependecy tree is in C#.</p>
  
  <p>I've initially tried just hooking up on the preparing-event &amp; the activating-event from Autofac. But I can't figure out if this is good enough. The results looks kinda funky. It seems that the preparing-event is initiated too often. And it seems that the activating event is only activated when a new object is actually created.</p>
  
  <p>Our code is .NET 4.7.2
  We're using Autofac as our container to handle the dependency injection.</p>
  
  <p>Does anyone have a good idé for how we can visualize the depth? Maybe there exists some good code or a product out there that can help us?</p>