Beispiel #1
0
        private static bool IsRoamingSetting(SettingsProperty setting)
        {
            bool flag  = !ApplicationSettingsBase.IsClickOnceDeployed(AppDomain.CurrentDomain);
            bool flag2 = false;

            if (flag)
            {
                SettingsManageabilityAttribute attribute = setting.Attributes[typeof(SettingsManageabilityAttribute)] as SettingsManageabilityAttribute;
                flag2 = (attribute != null) && (0 == 0);
            }
            return(flag2);
        }
        /// <devdoc>
        ///     Indicates whether a setting is roaming or not.
        /// </devdoc>
        private static bool IsRoamingSetting(SettingsProperty setting)
        {
            // Roaming is not supported in Clickonce deployed apps, since they don't have roaming config files.
            bool roamingSupported = !ApplicationSettingsBase.IsClickOnceDeployed(AppDomain.CurrentDomain);
            bool isRoaming        = false;

            if (roamingSupported)
            {
                SettingsManageabilityAttribute manageAttr = setting.Attributes[typeof(SettingsManageabilityAttribute)] as SettingsManageabilityAttribute;
                isRoaming = manageAttr != null && ((manageAttr.Manageability & SettingsManageability.Roaming) == SettingsManageability.Roaming);
            }

            return(isRoaming);
        }
Beispiel #3
0
        /// <summary>
        /// Indicates whether a setting is roaming or not.
        /// </summary>
        private static bool IsRoamingSetting(SettingsProperty setting)
        {
            SettingsManageabilityAttribute manageAttr = setting.Attributes[typeof(SettingsManageabilityAttribute)] as SettingsManageabilityAttribute;

            return(manageAttr != null && ((manageAttr.Manageability & SettingsManageability.Roaming) == SettingsManageability.Roaming));
        }
        public void GetValueIsExpected()
        {
            var testSettingManageabilityAttribute = new SettingsManageabilityAttribute(SettingsManageability.Roaming);

            Assert.Equal(SettingsManageability.Roaming, testSettingManageabilityAttribute.Manageability);
        }