private static XElement LoadXmlMembers(TypeInfo typeInfo)
        {
            var file    = XmlDocHelper.GetXmlDocFile(typeInfo.Assembly);
            var docXml  = XDocument.Load(file.FullName);
            var xmlRoot = docXml.Root;

            if (xmlRoot == null)
            {
                throw new ArgumentNullException(nameof(xmlRoot) + ", for " + typeInfo.FullName);
            }

            return(xmlRoot.Element("members"));
        }
        private static string BuildDescription(TypeInfo typeInfo)
        {
            var docMembers = LoadXmlMembers(typeInfo);

            var stringBuilder = new StringBuilder();

            var docMember = XmlDocHelper.GetTypeMember(docMembers, typeInfo);

            stringBuilder.AppendLine(docMember.Value.Trim());
            stringBuilder.AppendLine();

            BuildMembersDescription(typeInfo, stringBuilder, docMembers);

            return(stringBuilder.ToString());
        }
        private static void BuildMembersDescription(TypeInfo typeInfo, StringBuilder stringBuilder, XElement docMembers)
        {
            var enumValues = Enum.GetValues(typeInfo);

            for (int i = 0; i < enumValues.Length; i++)
            {
                var enumValue = enumValues.GetValue(i);
                var member    = typeInfo.GetMember(enumValue.ToString()).Single();
                var docMember = XmlDocHelper.GetDocMember(docMembers, member);

                string name        = enumValue.ToString();
                string description = docMember.Value.Trim();

                stringBuilder.AppendFormat("* `{0}` - {1}", name, description);
                stringBuilder.AppendLine();
            }
        }