Represents an entry in the documentation.
Esempio n. 1
0
        static void AddTypeToTopics(string name, string standardKind, object type, List <HelpTopic> topics)
        {
            var entry = new HelpEntry
            {
                Name     = name,
                Instance = type
            };
            var kind = standardKind;
            var decl = type.GetType().GetCustomAttributes(typeof(KindAttribute), false);

            if (decl.Length > 0)
            {
                kind = (decl[0] as KindAttribute).Kind;
            }

            foreach (var topic in topics)
            {
                if (topic.Kind.Equals(kind))
                {
                    entry.Topic = topic;
                    topic.Add(entry);
                    return;
                }
            }

            var ht = new HelpTopic(kind);

            entry.Topic = ht;
            ht.Add(entry);
            topics.Add(ht);
        }
Esempio n. 2
0
        static void AddTypeToTopics(String name, String standardKind, Object type, List<HelpTopic> topics)
        {
            var entry = new HelpEntry
            {
                Name = name,
                Instance = type
            };
            var kind = standardKind;
            var decl = type.GetType().GetCustomAttributes(typeof(KindAttribute), false);

            if (decl.Length > 0)
            {
                kind = (decl[0] as KindAttribute).Kind;
            }

            foreach (var topic in topics)
            {
                if (topic.Kind.Equals(kind))
                {
                    entry.Topic = topic;
                    topic.Add(entry);
                    return;
                }
            }

            var ht = new HelpTopic(kind);
            entry.Topic = ht;
            ht.Add(entry);
            topics.Add(ht);
        }