예제 #1
0
        //------------------------------------------------------------------------------
        void SaveDynamicSettingsDefaultOrder(ISettingsSerializer serializer, Type settingsType, ref SettingsHelperData settingsHelperData)
        {
            var settingsDefaultOrderSettingName = SettingNameFormatInfo.GetFullDynamicSettingsDefaultOrderSettingName(serializer as ISettingsSerializerWishes, settingsType);
            var simpleSettingsNames             = GetSimpleSettingsNamesWithDefaultOrder();

            SaveDynamicSettingsOrderImpl(settingsDefaultOrderSettingName, simpleSettingsNames, serializer, settingsType, ref settingsHelperData);
        }
예제 #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();
            }
        }
예제 #3
0
        //------------------------------------------------------------------------------
        IEnumerable <string> LoadDynamicSettingsDefaultOrder(ISettingsSerializer serializer, Type settingsClassType)
        {
            var settingsOrderFullName = SettingNameFormatInfo.GetFullDynamicSettingsDefaultOrderSettingName(serializer as ISettingsSerializerWishes, settingsClassType);

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