internal static OrganizationInfo GetOrganizationInfo(this MetaTopic metaTopic) { if (cache.ContainsKey(metaTopic)) { return(cache[metaTopic]); } var organizationInfo = metaTopic.GetContainerOrganizationInfo(); var topic = metaTopic.Topic; organizationInfo.Add(new OrganizationInfo.Node(topic.GetItemInfo(), Path.GetFileName(topic.Path))); organizationInfo.Add(new OrganizationInfo.Node(metaTopic.GetItemInfo(), string.Empty)); cache.Add(metaTopic, organizationInfo); return(organizationInfo); }
public virtual void Visit(MetaTopic metaTopic) { }
internal MetaTopicRenderer(MetaTopic input) : base(input) { this.input = input; }
public virtual void Leave(MetaTopic metaTopic) { }
public override void Leave(MetaTopic metaTopic) { var renderer = new MetaTopicRenderer(metaTopic); contentIO.CreateOutputFile(renderer.GetPseudoInputFilePath(), renderer.GetOutputFileContents()); }
public override void Visit(MetaTopic metaTopic) => contentIO.CopyFileToOutputDirectory(metaTopic.Path);
public override void Leave(MetaTopic metaTopic) { contentIO.CreateOutputFile(metaTopic.Path + OrganizationInfo.FilenameExtension, metaTopic.GetOrganizationInfo().GetOutputFileContents()); Leave(metaTopic); }
public override void Visit(MetaTopic metaTopic) { metaTopic.InitializeItemInfoExtensions(); Visit(metaTopic); }
internal static void InitializeItemInfoExtensions(this MetaTopic metaTopic) => cache.Add(metaTopic, new ItemInfo(".meta", metaTopic.GetAbstractTopicInfo().Title));