Esempio n. 1
0
        public DocumentFile(string path, string rootPath, string outputPath, string outputRootPath, string url, string rootUrl, Author author, MetadataCollection metadata, IDictionary<string, string> queries)
            : base(path, rootPath, outputPath, outputRootPath, rootUrl, url)
        {
            this.Now = DateTime.Now;

            this.Author = author;

            if (metadata != null)
            {
                this.Layout = metadata.Get<string>("layout");
                metadata.Remove("layout");

                this.Metadata = metadata;
            }

            this.Queries = queries;
        }
Esempio n. 2
0
        public DocumentFile(string path, string rootPath, string outputPath, string outputRootPath, string url, string rootUrl, Author author, MetadataCollection metadata, IDictionary<string, string> queries)
            : base(path, rootPath, outputPath, outputRootPath, rootUrl, url)
        {
            this.Author = author;

            var now = DateTime.Now;

            this.Now = now;
            this.NowUtc = now.ToUniversalTime();
            this.NowFriendlyDate = now.ToString("D");
            this.NowStandardUtcDate = now.ToUniversalTime().ToString("yyyy-MM-ddThh:mm:ssZ");

            if (metadata != null)
            {
                this.Layout = metadata.Get<string>("layout");
                metadata.Remove("layout");

                this.Metadata = metadata;
            }

            this.Queries = queries;
        }