Mosa.Compiler.Framework.MosaTypeLayout.GetInterfaceTable C# (CSharp) Method

GetInterfaceTable() public method

Gets the interface table.
public GetInterfaceTable ( MosaType type, MosaType interfaceType ) : MosaMethod[]
type MosaType The type.
interfaceType MosaType Type of the interface.
return MosaMethod[]
        public MosaMethod[] GetInterfaceTable(MosaType type, MosaType interfaceType)
        {
            if (type.Interfaces.Count == 0)
                return null;

            ResolveType(type);

            var methodTable = new MosaMethod[interfaceType.Methods.Count];

            // Implicit Interface Methods
            for (int slot = 0; slot < interfaceType.Methods.Count; slot++)
            {
                methodTable[slot] = FindInterfaceMethod(type, interfaceType.Methods[slot]);
            }

            // Explicit Interface Methods
            ScanExplicitInterfaceImplementations(type, interfaceType, methodTable);

            return methodTable;
        }