title: Validation of dependency injection container build
body: <p>When I build application using dependency injection container(Spring4D) I would like to know if container is build up correctly. In this situation:</p>
  
  <pre><code>GlobalContainer.RegisterType&lt;TApp&gt;;
  GlobalContainer.RegisterType&lt;TMyForm&gt;;
  GlobalContainer.Build;
  </code></pre>
  
  <p>If TMyForm inherits from Vcl.Forms.TForm then container will built up but application won't work because in fact TMyForm is not registered at all. I would like to know if there is any possibility to validate build process. Especially will resolver resolve the constructor that I think it should, not the default one?</p>
  
  <p>I tried something like that:</p>
  
  <pre><code>var
      registeredTypes: Spring.Collections.IEnumerable&lt;TComponentModel&gt;;
      registeredType: TComponentModel;
  begin
      GlobalContainer.RegisterType&lt;TApp&gt;;
      GlobalContainer.RegisterType&lt;TMyForm&gt;;
      GlobalContainer.Build;
  
      registeredTypes := GlobalContainer.Kernel.Registry.FindAll;
      for registeredType in registeredTypes do
      begin
           if not GlobalContainer.Kernel.Registry.HasService(registeredType.ComponentTypeInfo) then
              raise Exception.Create('Build Error');
      end;
  </code></pre>
  
  <p>But this is far from ideal.</p>