public TypeItem(Type type, SelectionContext <TypeItem> selectionContext, NamespaceItem owningNamespace) { this.type = type; this.selectionContext = selectionContext; this.owningNamespace = owningNamespace; this.fullName = AssemblyHelper.GetAssemblyName(this.type.Assembly).Name + ":" + this.type.Namespace + "." + this.type.Name; }
protected void AddType(Type type, SelectionContext <TypeItem> selectionContext) { this.Types.Add(type); NamespaceItem owningNamespace = (NamespaceItem)null; string index = type.Namespace ?? StringTable.ClrObjectDialogDefaultNamespace; if (!this.namespaces.TryGetValue(index, out owningNamespace)) { owningNamespace = new NamespaceItem(AssemblyHelper.GetAssemblyName(type.Assembly).Name, index, this); this.namespaces[index] = owningNamespace; this.AddChild((FilteredTreeItem)owningNamespace); } owningNamespace.AddChild((FilteredTreeItem) new TypeItem(type, selectionContext, owningNamespace)); }