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

IsUserSetting() приватный Метод

private IsUserSetting ( SettingsProperty setting ) : bool
setting SettingsProperty
Результат bool
        private bool IsUserSetting(SettingsProperty setting) {
            bool isUser = setting.Attributes[typeof(UserScopedSettingAttribute)] is UserScopedSettingAttribute;
            bool isApp  = setting.Attributes[typeof(ApplicationScopedSettingAttribute)] is ApplicationScopedSettingAttribute;

            if (isUser && isApp) {
                throw new ConfigurationErrorsException(SR.GetString(SR.BothScopeAttributes));
            }
            else if (!(isUser || isApp)) {
                throw new ConfigurationErrorsException(SR.GetString(SR.NoScopeAttributes));
            }

            return isUser;
        }