Fork me on GitHub

Lamar 5.0.0


Next

Environment Tests

Previous

WhatDoIHave()

Validating Container Configuration


To find any potential holes in your Lamar configuration like missing dependencies, unclear defaults of plugin types, validation errors, or just plain build errors, you can use this method below:


container.AssertConfigurationIsValid();

Running this method will walk over every single registration in your Container and:

  1. Try to create a build plan for that Instance that will flush out any problems with missing dependencies or invalid inline configuration
  2. Try to build every single configured Instance
  3. Call any methods on built objects decorated with the [ValidationMethod] attribute to perform environment tests. See Environment Tests for more information on this usage.

If Lamar encounters any errors of any kind during this method, it will throw an exception summarizing all of the problems that it encountered.