Ejemplo n.º 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)
 {
 }
Ejemplo n.º 3
0
 internal MetaTopicRenderer(MetaTopic input) : base(input)
 {
     this.input = input;
 }
 public virtual void Leave(MetaTopic metaTopic)
 {
 }
Ejemplo n.º 5
0
        public override void Leave(MetaTopic metaTopic)
        {
            var renderer = new MetaTopicRenderer(metaTopic);

            contentIO.CreateOutputFile(renderer.GetPseudoInputFilePath(), renderer.GetOutputFileContents());
        }
Ejemplo n.º 6
0
 public override void Visit(MetaTopic metaTopic) => contentIO.CopyFileToOutputDirectory(metaTopic.Path);
Ejemplo n.º 7
0
 public override void Leave(MetaTopic metaTopic)
 {
     contentIO.CreateOutputFile(metaTopic.Path + OrganizationInfo.FilenameExtension, metaTopic.GetOrganizationInfo().GetOutputFileContents());
     Leave(metaTopic);
 }
Ejemplo n.º 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));