c# - Structuremap ObjectFactory.GetAllInstances inserts null value into list -
i have simple list instantiating structuremaps objectfactory.getallinstances().
private list<userreleasetime> _userreleasetimes = objectfactory.getallinstances<userreleasetime>().tolist()
userreleasetime looks this:
public class userreleasetime { public string name { get; set; } public double totalreleasetime { get; set; } public double withinreleasehours { get; set; } public double outsidereleasehours { get; set; } }
after collection created appears structuremap adds 1 object empty or null values. there anyway stop happening?
update: userreleasetime registered structuremap this:
for<userreleasetime>().use<userreleasetime>();
Comments
Post a Comment