Ejemplo n.º 1
0
        public string GetString(IniParameters parameters, string file, DateTime dateTime)
        {
            var blr = new StringBuilder();

            var cc = (char)parameters.CommentChar;
            foreach (var comment in this.Comments)
            {
                blr.AppendLine(cc + new TokenFormatter(new[] {
                    FormatToken.New("t", dateTime.ToShortTimeString),
                    FormatToken.New("d", dateTime.ToShortDateString),
                    FormatToken.New("f", () => file)
                }).Format(comment));
            }

            return blr.ToString();
        }
Ejemplo n.º 2
0
        protected string GetCommentsString(IniParameters parameters)
        {
            var blr = new StringBuilder();
            var cc = (char)parameters.CommentChar;
            foreach (var comment in comments)
            {
                blr.AppendLine(cc + comment);
            }

            return blr.ToString();
        }
Ejemplo n.º 3
0
 public abstract string GetString(IniParameters parameters);
Ejemplo n.º 4
0
 public override string GetString(IniParameters parameters)
 {
     return this.GetString(parameters, DateTime.Now.Ticks + ".ini", DateTime.Now);
 }