コンテナにいくつかのコンポーネントを登録しましたが、Windsorは問題なくそれらを注入できます。これで、NHibernateISessionFactoryの新しい登録が次のように追加されました。
foreach (KeyValuePair<string, string> _tenantItem in _contextWrapper.TenantsConnectionStrings)
{
var config = Fluently.Configure()
.Database(
MsSqlConfiguration.MsSql2008
.UseOuterJoin()
.ConnectionString(_tenantItem.Value)
.FormatSql()
.ShowSql()
)
.ExposeConfiguration(ConfigurePersistence)
.ProxyFactoryFactory(typeof(ProxyFactoryFactory))
.BuildConfiguration();
Kernel.Register(
Component.For<ISessionFactory>()
.UsingFactoryMethod(config.BuildSessionFactory)
.Named(_tenantItem.Key)
.LifestyleTransient()
);
}
コンテナを検査しようとすると、次のように表示されます。
コンポーネントの実装は「レイトバウンド」であり、Windsorはそれを注入しません。
どうしたの?何を確認できますか?