Closed gmasselli closed 11 years ago
Thanks! :tada: Are you subclassing Configuration and wanting to use it? I'm trying to think how it would be used if exposed as protected or public.
Yes, I am subclassing the Configuration class by following the Cloud example. Locally I've exposed it as protected and then set it in the cstor:
SectionName = sectionName ?? AppSettingsSectionName;
_section = (NameValueCollection)ConfigurationManager.GetSection(SectionName);
Should we be concerned about a property name collision with a configuration key called "SectionName"? Would it be better to expose this as a method than a property?
Yeah, I want to avoid public members on Formo.Configuration
as much as possible. Correct me if I'm wrong, but couldn't we just use protected readonly string _sectionName
? That way subclasses can expose it however they wish?
Yes, I like that option better than a public member.
This is on a pre-release nuget package: http://nuget.org/packages/Formo/1.3.0-pre
Love the project, BTW. :)
When inheriting from Configuration no access is provided to the cstor parameter sectionName. The CloudConfiguration doesn't appear to use it, but it would be useful in other implementations.