Beispiel #1
0
		public CacheRule CacheRuleForAllPossibleInstancesOfTopic(TopicName aName)
		{
			TopicsCacheRule rule = new TopicsCacheRule(Federation);
			foreach (AbsoluteTopicName possible in aName.AllAbsoluteTopicNamesFor(this))
				rule.AddTopic(possible);

			CompositeCacheRule answer = new CompositeCacheRule();
			answer.Add(rule);
			answer.Add(CacheRuleForDefinition);		// Add the cache rule for the content base, too, since if that changes there might be a change in imports
			return answer;
		}
Beispiel #2
0
		/// <summary>
		/// Answer a collection of namespaces in which the topic actually exists
		/// </summary>
		/// <param name="topic">The topic you want to search for in all namespaces (might be relative, in which case it's relative to this content base)</param>
		/// <returns>A list of namespaces (as strings); empty if none</returns>
		public IList TopicNamespaces(TopicName topic)
		{
			ArrayList answer = new ArrayList();
			foreach (AbsoluteTopicName each in topic.AllAbsoluteTopicNamesFor(this))
			{
				if (TopicExists(each))
					answer.Add(each.Namespace);
			}
			return answer;
		}