Exemple #1
0
 public Entry GetMemberDoc(MemberInfo info)
 {
     if (info == null) return null;
     Entry result;
     if (!this.entries.TryGetValue(info.GetMemberId(), out result)) return null;
     return result;
 }
Exemple #2
0
		public static HelpInfo FromMember(MemberInfo member)
		{
			if (member == null) return null;
			XmlCodeDoc.Entry doc = HelpSystem.GetXmlCodeDoc(member);

			if (doc != null)
			{
				HelpInfo info = new HelpInfo();

				info.id = member.GetMemberId();
				info.topic = member.Name;
				info.desc = "";

				if (doc.Summary != null) info.desc += doc.Summary;
				if (doc.Remarks != null) info.desc += "\n\n" + doc.Remarks;

				return info;
			}

			return CreateNotAvailable(member.Name);
		}
Exemple #3
0
			public static Entry Create(MemberInfo member)
			{
				EntryType entryType;
				if (member is Type) entryType = EntryType.Type;
				else if (member is FieldInfo) entryType = EntryType.Field;
				else if (member is PropertyInfo) entryType = EntryType.Property;
				else if (member is MethodInfo) entryType = EntryType.Method;
				else if (member is ConstructorInfo) entryType = EntryType.Constructor;
				else if (member is EventInfo) entryType = EntryType.Event;
				else entryType = EntryType.Unknown;

				if (member is Type)
					return new Entry(entryType, (member as Type).GetTypeId(), member.GetMemberId());
				else if (member != null)
					return new Entry(entryType, member.DeclaringType.GetTypeId(), member.GetMemberId());
				else
					return null;
			}