public void Inspect(IHandler handler, DependencyModel[] missingDependencies, IKernel kernel)
{
if (handlersChecked.Add(handler) == false)
{
return;
}
Debug.Assert(missingDependencies.Length > 0, "missingDependencies.Length > 0");
var uniqueOverrides = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
message.AppendLine();
message.AppendFormat("'{0}' is waiting for the following dependencies:", handler.ComponentModel.Name);
message.AppendLine();
foreach (var dependency in missingDependencies)
{
if (dependency.ReferencedComponentName != null)
{
// NOTE: that's a workaround for us having dependency twice potentially, once from configuration and once from actual type scan
if (uniqueOverrides.Add(dependency.ReferencedComponentName))
{
InspectServiceOverrideDependency(dependency, kernel);
}
}
else if (dependency.IsPrimitiveTypeDependency)
{
//hardcoding string as it's a most common type that is not value type but you wouldn't want to kave that as a service.
InspectParameterDependency(dependency);
}
else
{
InspectServiceDependency(handler, dependency, kernel);
}
}
}