System.Configuration.LocalFileSettingsProvider.Upgrade C# (CSharp) Метод

Upgrade() публичный Метод

public Upgrade ( SettingsContext context, SettingsPropertyCollection properties ) : void
context SettingsContext
properties SettingsPropertyCollection
Результат void
        public void Upgrade(SettingsContext context, SettingsPropertyCollection properties) {
            // Separate the local and roaming settings and upgrade them separately.
            
            SettingsPropertyCollection local = new SettingsPropertyCollection();
            SettingsPropertyCollection roaming = new SettingsPropertyCollection();
            
            foreach (SettingsProperty sp in properties) {
                bool isRoaming = IsRoamingSetting(sp);

                if (isRoaming) {
                    roaming.Add(sp);
                }
                else {
                    local.Add(sp);
                }
            }

            if (roaming.Count > 0) {
                Upgrade(context, roaming, true);
            }

            if (local.Count > 0) {
                Upgrade(context, local, false);
            }
        }

Same methods

LocalFileSettingsProvider::Upgrade ( SettingsContext context, SettingsPropertyCollection properties, bool isRoaming ) : void