Пример #1
0
        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)
 {
 }
Пример #3
0
 internal MetaTopicRenderer(MetaTopic input) : base(input)
 {
     this.input = input;
 }
 public virtual void Leave(MetaTopic metaTopic)
 {
 }
Пример #5
0
        public override void Leave(MetaTopic metaTopic)
        {
            var renderer = new MetaTopicRenderer(metaTopic);

            contentIO.CreateOutputFile(renderer.GetPseudoInputFilePath(), renderer.GetOutputFileContents());
        }
Пример #6
0
 public override void Visit(MetaTopic metaTopic) => contentIO.CopyFileToOutputDirectory(metaTopic.Path);
Пример #7
0
 public override void Leave(MetaTopic metaTopic)
 {
     contentIO.CreateOutputFile(metaTopic.Path + OrganizationInfo.FilenameExtension, metaTopic.GetOrganizationInfo().GetOutputFileContents());
     Leave(metaTopic);
 }
Пример #8
0
 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));