public ParsedTopic(TopicPropertyCollection properties, TopicRevisionCollection topicLinks, ExternalReferencesMap externalReferences) { _properties.AddRange(properties); _topicLinks.AddRange(topicLinks); _externalReferences.AddRange(externalReferences); }
private static TopicRevisionCollection ParseTopicLinks(string text) { TopicRevisionCollection referencedTopics = new TopicRevisionCollection(); // TODO: Move Formatter functionality to TopicParser MatchCollection wikiNames = Formatter.extractWikiNames.Matches(text); List<string> processed = new List<string>(); foreach (Match m in wikiNames) { string each = m.Groups["topic"].ToString(); if (processed.Contains(each)) { continue; // skip duplicates } processed.Add(each); TopicRevision referencedTopic = new TopicRevision(StripTopicNameEscapes(each)); referencedTopics.Add(referencedTopic); } return referencedTopics; }