/// <summary>Crates a IniFileValue object from it's data.</summary>
        /// <param name="key">Value name.</param>
        /// <param name="value">Associated value.</param>
        public static IniFileValue FromData(string key, string value)
        {
            IniFileValue ret = new IniFileValue();

            ret.key = key; ret.value = value;
            ret.FormatDefault();
            return(ret);
        }
示例#2
0
        public static IniFileValue FromData(string key, string value)
        {
            IniFileValue iniFileValue = new IniFileValue();

            iniFileValue.key   = key;
            iniFileValue.value = value;
            iniFileValue.FormatDefault();
            return(iniFileValue);
        }
        /// <summary>Creates a new IniFileValue object basing on a key and a value and the formatting  of this IniFileValue.</summary>
        /// <param name="key">Name of value</param>
        /// <param name="value">Value</param>
        public IniFileValue CreateNew(string key, string value)
        {
            IniFileValue ret = new IniFileValue();

            ret.key = key; ret.value = value;
            if (IniFileSettings.PreserveFormatting)
            {
                ret.formatting = formatting;
                if (IniFileSettings.AllowInlineComments)
                {
                    ret.inlineCommentChar = inlineCommentChar;
                }
                ret.Format();
            }
            else
            {
                ret.FormatDefault();
            }
            return(ret);
        }
示例#4
0
        public IniFileValue CreateNew(string key, string value)
        {
            IniFileValue iniFileValue = new IniFileValue();

            iniFileValue.key   = key;
            iniFileValue.value = value;
            if (IniFileSettings.PreserveFormatting)
            {
                iniFileValue.formatting = formatting;
                if (IniFileSettings.AllowInlineComments)
                {
                    iniFileValue.inlineCommentChar = inlineCommentChar;
                }
                iniFileValue.Format();
            }
            else
            {
                iniFileValue.FormatDefault();
            }
            return(iniFileValue);
        }
示例#5
0
 /// <summary>Creates a new IniFileValue object basing on a key and a value and the formatting  of this IniFileValue.</summary>
 /// <param name="key">Name of value</param>
 /// <param name="value">Value</param>
 public IniFileValue CreateNew(string key, string value)
 {
     IniFileValue ret = new IniFileValue();
     ret.key = key; ret.value = value;
     if (IniFileSettings.PreserveFormatting) {
         ret.formatting = formatting;
         if (IniFileSettings.AllowInlineComments)
             ret.inlineCommentChar = inlineCommentChar;
         ret.Format();
     }
     else
         ret.FormatDefault();
     return ret;
 }
示例#6
0
 /// <summary>Crates a IniFileValue object from it's data.</summary>
 /// <param name="key">Value name.</param>
 /// <param name="value">Associated value.</param>
 public static IniFileValue FromData(string key, string value)
 {
     IniFileValue ret = new IniFileValue();
     ret.key = key; ret.value = value;
     ret.FormatDefault();
     return ret;
 }