/// <summary>
        /// Generates the list of "TargetModels" for the tree view "Target" for the specified document
        /// </summary>
        /// <param name="xmlDocument">The xml document that has the list of data</param>
        /// <param name="count"></param>
        internal static List <MessageModel> GenerateTargetTreeList(XmlDocument xmlDocument, ref int count)
        {
            var messageModels = new List <MessageModel>();
            var targets       = xmlDocument.GetElementsByTagName("Target");

            foreach (XmlNode target in targets)
            {
                foreach (XmlNode module in target.SelectNodes("Modules/Module"))
                {
                    messageModels.AddRange(XmlNodeHelper.NodeListHelper(module, ref count));
                }
            }

            return(messageModels);
        }
        internal static IReadOnlyCollection <MessageModel> SetupNamespaceList(XmlNodeList namespaces, ref int count)
        {
            var messageModels = new List <MessageModel>(namespaces.Count);

            foreach (XmlNode @namespace in namespaces)
            {
                var namespaceModel = new NamespaceModel
                {
                    Name = XmlNodeHelper.GetNodeAttributeValue(@namespace, "Name")
                };

                // Get the list of messages
                messageModels.AddRange(MessageModelHelper.BuildListOfMessages(@namespace, namespaceModel, ref count));

                var list = XmlNodeHelper.NodeListHelper(@namespace, ref count);

                messageModels.AddRange(list);
            }

            return(messageModels);
        }