internal TypeInfoTreeNode(Type type, ITypeInfoTreeNode parent) { Parent = parent; _type = (type is TypeInfo) ? (TypeInfo)type : type.GetTypeInfo(); foreach (Type t in type.GetNestedTypes()) { _innerList.Add(new TypeInfoTreeNode(t, this)); } }
bool ICollection <ITypeInfoTreeNode> .Remove(ITypeInfoTreeNode item) { throw new NotSupportedException(); }
void IList <ITypeInfoTreeNode> .Insert(int index, ITypeInfoTreeNode item) { throw new NotSupportedException(); }
int IList <ITypeInfoTreeNode> .IndexOf(ITypeInfoTreeNode item) { return(_innerList.IndexOf(item)); }
bool ICollection <ITypeInfoTreeNode> .Contains(ITypeInfoTreeNode item) { return(_innerList.Contains(item)); }
void ICollection <ITypeInfoTreeNode> .Add(ITypeInfoTreeNode item) { throw new NotSupportedException(); }
int IList <ITypeInfoTreeNode> .IndexOf(ITypeInfoTreeNode item) { return((item != null && item is TypeInfoTreeNode) ? IndexOf((TypeInfoTreeNode)item) : -1); }
bool ICollection <ITypeInfoTreeNode> .Contains(ITypeInfoTreeNode item) { return(item != null && item is TypeInfoTreeNode && _innerList.Contains(item)); }