ConfigurationModelInspector
Uses the ConfigurationStore registered in the kernel to obtain
an IConfiguration associated with the component.
using Castle.Core;
using Castle.Core.Configuration;
using System;
namespace Castle.MicroKernel.ModelBuilder.Inspectors
{
[Serializable]
public class ConfigurationModelInspector : IContributeComponentModelConstruction
{
public virtual void ProcessModel(IKernel kernel, ComponentModel model)
{
IConfiguration val = model.Configuration = kernel.ConfigurationStore.GetComponentConfiguration(model.Name);
}
}
}