Exemplo n.º 1
0
        private object Fmt(INote d)
        {
            StringBuilder b = new StringBuilder();

            b.AppendLine("Note");
            b.AppendLine("{");
            b.AppendLine($"\tTitle:         '{d.Title}'");
            b.AppendLine($"\tContentLength: {d.Text.Length}");
            b.AppendLine($"\tContentHash:   {ChecksumHelper.MD5(d.Text)}");
            b.AppendLine($"\tChangeDate:    {d.ModificationDate.ToString("yyyy-MM-dd HH:mm:ss")}");
            b.AppendLine($"\tFolder:        {d.Path.StrSerialize()}");
            b.AppendLine("}");
            return(b.ToString());
        }
Exemplo n.º 2
0
        private object Fmt(PathEntry d)
        {
            StringBuilder b = new StringBuilder();

            b.AppendLine("PathEntry");
            b.AppendLine("{");
            b.AppendLine($"\tTitle:         '{d.Title}'");
            b.AppendLine($"\tContentLength: {d.Content.Length}");
            b.AppendLine($"\tContentHash:   {ChecksumHelper.MD5(d.Content)}");
            b.AppendLine($"\tChangeDate:    {d.MDate.ToString("yyyy-MM-dd HH:mm:ss")}");
            b.AppendLine($"\tPath:          {d.FilesystemPath}");
            b.AppendLine($"\tFolder:        {d.NotePath.StrSerialize()}");
            b.AppendLine("}");
            return(b.ToString());
        }