IConfigSource.Configs property breaks decoupling
Brought to you by:
bmatzelle
Because of this...
public interface IConfigSource
{
ConfigCollection Configs {get;}
...
}
combined with this...
public class ConfigCollection
{
public ConfigCollection(ConfigSourceBase owner);
}
... it isn't possible to implement IConfigSource
without sub-classing ConfigSourceBase.
There are two possible resolutions:
1. Property IConfigSource.Configs should return an
IDictionary
2. The type of the owner passed to the ConfigCollection
should just be IConfigSource
Solution #1 involves more code changes, but results in
a cleaner interface.
Solution #2 requires minimal code changes and doesn't
break any of the unit tests.
Logged In: YES
user_id=163900
That's a very good point. Thank you for catching that for me.