예제 #1
0
 public string GetTopicFormattedBorder(AbsoluteTopicName name, Border border)
 {
   string answer = null;
   if (CacheManager != null)
   {
     answer = (string)CacheManager.GetCachedTopicFormattedBorder(name, border);
   }
   if (answer != null)
   {
     return answer;
   }
   // OK, we need to figure it out.  
   CompositeCacheRule rule = new CompositeCacheRule();				
   IEnumerable borderText = BorderText(name, border, rule);
   WikiOutput output = new HTMLWikiOutput(null);
   foreach (IBELObject borderComponent in borderText)
   {
     IOutputSequence seq = borderComponent.ToOutputSequence();
     // output sequence -> pure presentation tree
     IWikiToPresentation presenter = Formatter.WikiToPresentation(name, output, ContentBaseForTopic(name), LinkMaker, null, 0, rule);
     IPresentation pres = seq.ToPresentation(presenter);
     pres.OutputTo(output);
   }
   answer = output.ToString();
   if (CacheManager != null)
   {
     CacheManager.PutCachedTopicFormattedBorder(name, border, answer, rule);
   }
   return answer;
 }
예제 #2
0
 public string GetTopicFormattedBorder(QualifiedTopicRevision name, Border border)
 {
     string answer = null;
     // OK, we need to figure it out.  
     IEnumerable borderText = BorderText(name, border);
     WikiOutput output = new HTMLWikiOutput(null);
     foreach (IBELObject borderComponent in borderText)
     {
         IOutputSequence seq = borderComponent.ToOutputSequence();
         // output sequence -> pure presentation tree
         IWikiToPresentation presenter = Formatter.WikiToPresentation(name, output, NamespaceManagerForTopic(name), LinkMaker, null, 0);
         IPresentation pres = seq.ToPresentation(presenter);
         pres.OutputTo(output);
     }
     answer = output.ToString();
     return answer;
 }