Example #1
0
		private void Add(string name, string fullname, string datatype, int imageIndex)
		{
            List<MemberEntry> membersWithSameName;
		    
            if (!_memberEntries.TryGetValue(name, out membersWithSameName))
			{
				membersWithSameName = new List<MemberEntry>();
				_memberEntries.Add(name, membersWithSameName);
			}

			MemberEntry entry = new MemberEntry();
			entry.Description = String.Format(CultureInfo.CurrentCulture, "<b>{0}</b> : {1}", fullname, datatype);
			entry.ImageIndex = imageIndex;

			membersWithSameName.Add(entry);
		}
			internal void AddMember (object owner, MemberDescriptor member, bool absolute)
			{
				if (_closed)
					throw new InvalidOperationException ("store is closed");
				if (member == null)
					throw new ArgumentNullException ("member");
				if (owner == null)
					throw new ArgumentNullException ("owner");

				if (_objects == null)
					_objects = new Dictionary <string, ObjectEntry> ();

				string objectName = GetName (owner);
				if (!_objects.ContainsKey (objectName))
					_objects.Add (objectName,  new ObjectEntry (owner, objectName));
				MemberEntry memberEntry = new MemberEntry (member);
				memberEntry.Absolute = absolute;
				_objects[objectName].Members[member.Name] = memberEntry;
			}