有没有办法将Name属性作为参数传递给Lazy BOM Initialization?
public class Item
{
private Lazy<BOM> _BOM = new Lazy<BOM>(); // How to pass the Name as parameter ???
public Item(string name)
{
this.Name = name;
}
public string Name { get; private set; }
public BOM BOM { get { return _BOM.Value; } }
}
public class BOM
{
public BOM (string name)
{
}
}