public WireTypes.AbsoluteTopicNameCollection GetAllTopics(WireTypes.ContentBase cb) { WireTypes.AbsoluteTopicNameCollection topicNames = new WireTypes.AbsoluteTopicNameCollection(); foreach (TopicName ab in Federation.NamespaceManagerForNamespace(cb.Namespace).AllTopics(ImportPolicy.DoNotIncludeImports)) { // We need to also return the current version NamespaceManager contentStoreManager2 = Federation.NamespaceManagerForTopic(ab); WireTypes.AbsoluteTopicName atn = new WireTypes.AbsoluteTopicName(); atn.Name = ab.LocalName; atn.Namespace = ab.Namespace; string version = contentStoreManager2.LatestVersionForTopic(ab.LocalName); if (version == null) { // There's only one version, so just use the empty string version = ""; } atn.Version = version; topicNames.Add(atn); } return topicNames; }
public WireTypes.AbsoluteTopicNameCollection GetAllTopics(WireTypes.ContentBase cb) { WireTypes.AbsoluteTopicNameCollection topicNames = new WireTypes.AbsoluteTopicNameCollection(); foreach (AbsoluteTopicName ab in TheFederation.ContentBaseForNamespace(cb.Namespace).AllTopics(false)) { // We need to also return the current version ContentBase cb2 = TheFederation.ContentBaseForTopic(ab); WireTypes.AbsoluteTopicName atn = new WireTypes.AbsoluteTopicName(); atn.Name = ab.Name; atn.Namespace = ab.Namespace; string version = cb2.LatestVersionForTopic(ab.LocalName); if (version == null) { // There's only one version, so just use the empty string version = ""; } atn.Version = version; topicNames.Add(atn); } return topicNames; }