Windsor が型をインスタンス化するときにカスタム処理を実行することは可能ですか?
次のようなもの:
container.Register(
AllTypes.Pick()
.FromAssembly(Assembly.GetExecutingAssembly())
.BasedOn<MyMarkerInterface>()
.WhenInstantiating(instance => // do some stuff with this instance)
.Configure(component => component.Startable().LifeStyle.Singleton)
.WithService.Base());
現在、IStartableを使用しています。「開始」コード (つまり、カスタム処理) は同一であるため、このロジックを各クラスから移動するとよいでしょう。
ありがとう!ブライアン