Exemplo n.º 1
0
 public TemplateReference(Trifolia.DB.Template template)
 {
     this.Name                = template.Name;
     this.Identifier          = template.Oid;
     this.Bookmark            = template.Bookmark;
     this.ImplementationGuide = template.OwningImplementationGuide.GetDisplayName();
     this.PublishDate         = template.OwningImplementationGuide.PublishDate;
 }
 private void MigrateConstraints(Trifolia.DB.Template template)
 {
     foreach (var constraint in template.ChildConstraints.Where(y => !string.IsNullOrEmpty(y.PrimitiveText)))
     {
         if (!string.IsNullOrEmpty(constraint.PrimitiveText))
         {
             constraint.PrimitiveText = this.ConvertWikiToMarkdown(constraint.PrimitiveText, template.OwningImplementationGuideId, template.Id, "PrimitiveText", constraint.Id);
             this.WriteVerbose(string.Format("Update template {0}'s constraint {1}'s PrimitiveText to be markdown",
                                             template.Id,
                                             constraint.Id));
         }
     }
 }
        private void MigrateTemplate(Trifolia.DB.Template template)
        {
            if (!string.IsNullOrEmpty(template.Description))
            {
                template.Description = this.ConvertWikiToMarkdown(template.Description, template.OwningImplementationGuideId, template.Id, "Description");
                this.WriteVerbose("Updated template " + template.Id + "'s description to be markdown");
            }

            if (!string.IsNullOrEmpty(template.Notes))
            {
                template.Notes = this.ConvertWikiToMarkdown(template.Notes, template.OwningImplementationGuideId, template.Id, "Notes");
                this.WriteVerbose("Updated template " + template.Id + "'s notes to be markdown");
            }

            this.MigrateConstraints(template);
        }