Microsoft.CSharp.RuntimeBinder.SymbolTable.CreateInheritanceHierarchyList C# (CSharp) 메소드

CreateInheritanceHierarchyList() 개인적인 메소드

private CreateInheritanceHierarchyList ( Type type ) : List
type System.Type
리턴 List
        private List<Type> CreateInheritanceHierarchyList(Type type)
        {
            List<Type> list = new List<Type>();
            list.Insert(0, type);
            for (Type parent = type.GetTypeInfo().BaseType; parent != null; parent = parent.GetTypeInfo().BaseType)
            {
                // Load it in the symbol table.
                LoadSymbolsFromType(parent);

                // Insert into our list of Types.
                list.Insert(0, parent);
            }

            // If we have a WinRT type then we should load the members of it's collection interfaces
            // as well as those members are on this type as far as the user is concerned.
            CType ctype = GetCTypeFromType(type);
            if (ctype.IsWindowsRuntimeType())
            {
                TypeArray collectioniFaces = ctype.AsAggregateType().GetWinRTCollectionIfacesAll(_semanticChecker.GetSymbolLoader());

                for (int i = 0; i < collectioniFaces.size; i++)
                {
                    CType collectionType = collectioniFaces.Item(i);
                    Debug.Assert(collectionType.isInterfaceType());

                    // Insert into our list of Types.
                    list.Insert(0, collectionType.AssociatedSystemType);
                }
            }
            return list;
        }
        #endregion