protected internal override void OnPopulate(TreeViewCancelEventArgs e) { TypeRefDeclaration externalType = this.Declaration as TypeRefDeclaration; if (externalType.TypeRefs.Count > 0) { this.Nodes.Add(new ExternalTypeFolderTreeNode(externalType, "Nested Types")); } ExternalFieldTreeNode.PopulateExternalMembers(externalType, this.Nodes, false); }
protected internal override void OnPopulate(TreeViewCancelEventArgs e) { ExternalFieldTreeNode.PopulateExternalMembers(this.typeSpec, this.Nodes, false); }
protected internal override void OnPopulate(TreeViewCancelEventArgs e) { if (type.GenericParameters.Count > 0) { this.Nodes.Add(new GenericParameterCollectionTreeNode(this.type.GenericParameters)); } if (type.InterfaceImplementations.Count > 0) { this.Nodes.Add(new InterfaceImplementationCollectionTreeNode(this.type)); } if (type.Types.Count > 0) { this.Nodes.Add(new NestedTypeFolderTreeNode(this.type)); } /* * if (type.GenericParameters.Count > 0) * { * this.Nodes.Add(new GenericArgumentCollectionTreeNode(this.type)); * } */ Dictionary <IMethod, bool> ignoreMethod = new Dictionary <IMethod, bool>(); foreach ( PropertyDeclaration property in ArrayHelper.ToSortedArray <PropertyDeclaration>(this.type.Properties)) { foreach (MethodSemanticDeclaration method in property.Members) { ignoreMethod.Add(method.Method, true); } } foreach (EventDeclaration @event in ArrayHelper.ToSortedArray <EventDeclaration>(this.type.Events)) { foreach (MethodSemanticDeclaration method in @event.Members) { ignoreMethod.Add(method.Method, true); } } foreach ( MethodDefDeclaration method in ArrayHelper.ToSortedArray <MethodDefDeclaration>(this.type.Methods)) { if (!ignoreMethod.ContainsKey(method)) { this.Nodes.Add(new MethodTreeNode(method)); } } foreach ( PropertyDeclaration property in ArrayHelper.ToSortedArray <PropertyDeclaration>(this.type.Properties)) { this.Nodes.Add(new PropertyTreeNode(property)); } foreach (EventDeclaration @event in ArrayHelper.ToSortedArray <EventDeclaration>(this.type.Events)) { this.Nodes.Add(new EventTreeNode(@event)); } foreach (FieldDefDeclaration field in ArrayHelper.ToSortedArray <FieldDefDeclaration>(this.type.Fields)) { this.Nodes.Add(new FieldTreeNode(field)); } ExternalFieldTreeNode.PopulateExternalMembers(this.type, this.Nodes, true); }