Exemple #1
0
        //------------------------------------------------------------------------------
        void SaveDynamicSettingsCustomOrder(ISettingsSerializer serializer, Type settingsType, ref SettingsHelperData settingsHelperData)
        {
            var settingsCustomOrderSettingName = SettingNameFormatInfo.GetFullDynamicSettingsCustomOrderSettingName(serializer as ISettingsSerializerWishes, settingsType);
            var simpleSettingsNames            = GetSimpleSettingsNamesWithCustomOrder();

            SaveDynamicSettingsOrderImpl(settingsCustomOrderSettingName, simpleSettingsNames, serializer, settingsType, ref settingsHelperData);
        }
Exemple #2
0
        //------------------------------------------------------------------------------
        public virtual void DeleteSettings()
        {
            lock (m_lockObject)
            {
                var serializersCache = new Dictionary <Type, KeyValuePair <ISettingsSerializer, bool> >();

                var settingsHelperData = new SettingsHelperData()
                {
                    SerializersCache = serializersCache
                };
                ProcessDynamicSettings(SettingsEnumerationMode.Delete, ref settingsHelperData);

                var serializer = SettingsHelper.GetSerializerDependFromSettingAttributeType(this.Context, typeof(ATTRIBUTE));
                var wishes     = serializer as ISettingsSerializerWishes;

                var settingsDefaultOrderFullName =
                    SettingNameFormatInfo.GetFullDynamicSettingsDefaultOrderSettingName(wishes, this.Context.GetType());
                var settingsCustomOrderFullName =
                    SettingNameFormatInfo.GetFullDynamicSettingsCustomOrderSettingName(wishes, this.Context.GetType());

                var inSettingInfo = new SettingInfo();

                inSettingInfo.SettingName = settingsDefaultOrderFullName;
                ProcessArbitraryDynamicSetting(inSettingInfo, SettingsEnumerationMode.Delete, ref settingsHelperData);

                inSettingInfo.SettingName = settingsCustomOrderFullName;
                ProcessArbitraryDynamicSetting(inSettingInfo, SettingsEnumerationMode.Delete, ref settingsHelperData);

                m_dynamicSettings.Clear();
            }
        }
Exemple #3
0
        //------------------------------------------------------------------------------
        IEnumerable <string> LoadDynamicSettingsCustomOrder(ISettingsSerializer serializer, Type settingsClassType)
        {
            var settingsCustomOrderFullName = SettingNameFormatInfo.GetFullDynamicSettingsCustomOrderSettingName(serializer as ISettingsSerializerWishes, settingsClassType);

            return(LoadDynamicSettingsOrderImpl(settingsCustomOrderFullName, serializer, settingsClassType));
        }