I am using a class (source not available to me) that looks like
class SettingsBuilder : ISettings
{
public string SettingProperty {get; set;}
public SettingsBuilder()
{}
public SettingsBulder(ISettingBuilder settingBuilder)
{
//i don't know, but can imagine just setting members
}
public ISettings ToSettings() {}
}
windsor config looks like
<component id ="SettingsBuilder"
type="SettingsBuilder, NameSpace">
<parameters>
<SettingProperty>text</SettingProperty>
</parameters>
</component>
<component id="ISettings"
type="ISettings, NameSpace"
factoryId="SettingsBuilder"
factoryCreate="ToSettings">
</component>
Because the SettingBuilder constructor can take an instance of
ISettings this seems to create a circular reference in the container.
Can i force the container to call the default constructor instead?
The desired behavior is to call the default constructor, set the
property and then call ToSettings to get an instance of ISettings.
Possible?
thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---