c# - SetAllProperties method missing in structuremap Registry -
i have old project needs work doing on it, have run update-package in nuget , following in typeregistry
the name 'setallproperties' not exist in current scope
the typeregistry follows
public class typeregistry : registry { public typeregistry() { for<ilogger>().singleton().use<log4netlogger>(); this.setallproperties(p => p.oftype<ilogger>()); } }
can explain why case , point me me resolve problem please.
i ran problem well. think method might have been deprecated in newer versions. able accomplish setter injection using policies
property of registry class.
public class typeregistry : registry { public typeregistry() { for<ilogger>().singleton().use<log4netlogger>(); policies.fillallpropertiesoftype<ilogger>().use<log4netlogger>(); } }
edit:
just found setallproperties method on policies well. believe either 1 inject property.
Comments
Post a Comment