System.Configuration.SettingsProvider.GetPropertyValues C# (CSharp) Метод

GetPropertyValues() публичный абстрактный Метод

public abstract GetPropertyValues ( SettingsContext context, SettingsPropertyCollection collection ) : SettingsPropertyValueCollection
context SettingsContext
collection SettingsPropertyCollection
Результат SettingsPropertyValueCollection
        public abstract SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection collection);
        public abstract void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection);

Usage Example

        void CacheValuesByProvider(SettingsProvider provider)
        {
            SettingsPropertyCollection col = new SettingsPropertyCollection();

            foreach (SettingsProperty p in Properties)
            {
                if (p.Provider == provider)
                {
                    col.Add(p);
                }
            }

            if (col.Count > 0)
            {
                SettingsPropertyValueCollection vals = provider.GetPropertyValues(Context, col);
                foreach (SettingsPropertyValue prop in vals)
                {
                    if (PropertyValues [prop.Name] != null)
                    {
                        PropertyValues [prop.Name].PropertyValue = prop.PropertyValue;
                    }
                    else
                    {
                        PropertyValues.Add(prop);
                    }
                }
            }

            OnSettingsLoaded(this, new SettingsLoadedEventArgs(provider));
        }
All Usage Examples Of System.Configuration.SettingsProvider::GetPropertyValues