Windsor 2.5.2を使用すると、次のように機能します。
public class Foo
{
public IBar Bar { get; set; }
}
IBarの作成を遅らせるために、これも機能します。
public class Foo
{
public Foo(Func<IBar> barFactory)
{
}
}
ただし、プロパティインジェクションをと組み合わせるとFunc<T>
、次の結果がnull参照になります。
public class Foo
{
public Func<IBar> Bar { get; set; }
}
ウィンザーに注入させるにはどうすればよいFunc<IBar>
ですか?