Beispiel #1
0
        protected override void Reset(ConfigurationElement parentElement)
        {
            DefaultProxySection section = new DefaultProxySection();

            section.InitializeDefault();
            base.Reset(section);
        }
Beispiel #2
0
        // This allows us to prevent parent settings (machine.config) from propegating to higher config (app.config), unless
        // the higher config doesn't contain the section at all.  That is, overriding defaultProxy is all-or-nothing.
        // Template from sseely.
        protected override void Reset(ConfigurationElement parentElement)
        {
            // Ignore the parentElement parameter by changing it to the default settings
            DefaultProxySection defaultElement = new DefaultProxySection();

            // Initialize the parentElement to the right set of defaults (not needed now,
            // but this will avoid errors in the future if SetDefaults is ever overridden in this class.
            // ConfigurationElement::InitializeDefault is a no-op, so you aren’t hurting perf by anything
            // measurable.
            defaultElement.InitializeDefault();

            // Finally, pass it to the base class to do the “right things”
            base.Reset(defaultElement);
        }
        // This allows us to prevent parent settings (machine.config) from propegating to higher config (app.config), unless
        // the higher config doesn't contain the section at all.  That is, overriding defaultProxy is all-or-nothing.
        // Template from Microsoft.
        protected override void Reset(ConfigurationElement parentElement)
        {
            // Ignore the parentElement parameter by changing it to the default settings
            DefaultProxySection defaultElement = new DefaultProxySection();

            // Initialize the parentElement to the right set of defaults (not needed now,
            // but this will avoid errors in the future if SetDefaults is ever overridden in this class.
            // ConfigurationElement::InitializeDefault is a no-op, so you aren’t hurting perf by anything
            // measurable. 
            defaultElement.InitializeDefault();

            // Finally, pass it to the base class to do the “right things”
            base.Reset(defaultElement);
        }
 protected override void Reset(ConfigurationElement parentElement)
 {
     DefaultProxySection section = new DefaultProxySection();
     section.InitializeDefault();
     base.Reset(section);
 }