Exemple #1
0
        protected override void ParseHeader(string key, string value)
        {
            switch (key)
            {
            case "date":
                HasDate = true;
                return;

            case "title":
                Title = value;
                return;

            case "linktitle":
                LinkTitle = value;
                return;

            case "linkurl":
                LinkUrl = value;
                return;

            case "index":
                Index = value;
                return;

            case "meta":
                MetaTags.Add(MetaTag.ParseFrontMatter(value));
                return;
            }
            throw new DataFormatException("Unkown key: " + key);
        }
Exemple #2
0
        protected override void ParseHeader(string key, string value)
        {
            switch (key)
            {
            case "date":
                Date = DateTime.Parse(value);
                return;

            case "author":
                Author = value;
                return;

            case "title":
                Title = value;
                return;

            case "meta":
                MetaTags.Add(MetaTag.ParseFrontMatter(value));
                return;
            }
            throw new DataFormatException("Unkown key: " + key);
        }