public List <EventsTopicInfo> GetTopics()
        {
            var topicSet = GetTopicSet();

            if (topicSet == null || topicSet.Any == null || topicSet.Any.Length == 0)
            {
                return(null);
            }

            //Apply FindTopics to each element and aggregate results in one set
            var topics = topicSet.Any.Aggregate(new List <XmlElement>(), (s, e) => { FindTopics(e, s); return(s); });

            //From each XmlElement make TopicInfo object and from this object take EventsTopicInfo object
            return(topics.Select(nextTopicElement => TopicInfo.ConstructTopicInfo(nextTopicElement)).Select(info => info.GetPlainInfo()).ToList());
        }
        bool CheckEventTopic(FindEventResult e, XmlElement rawResultElement,
                             string topic,
                             string ns)
        {
            if (e.Event != null && e.Event.Topic != null)
            {
                TopicInfo expected =
                    TopicInfo.ConstructTopicInfo(new EventsTopicInfo()
                {
                    NamespacesDefinition = ns, Topic = topic
                });

                TopicInfo actual = CreateTopicInfo(e, rawResultElement);

                bool topicMatches = TopicInfo.TopicsMatch(actual, expected);

                return(topicMatches);
            }
            return(false);
        }