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

FindImplicitInterfaceMethod() private method

private FindImplicitInterfaceMethod ( MosaType type, MosaMethod interfaceMethod ) : MosaMethod
type MosaType
interfaceMethod MosaMethod
return MosaMethod
        private MosaMethod FindImplicitInterfaceMethod(MosaType type, MosaMethod interfaceMethod)
        {
            MosaMethod methodFound = null;

            var cleanInterfaceMethodName = GetCleanMethodName(interfaceMethod.Name);

            foreach (var method in type.Methods)
            {
                if (IsExplicitInterfaceMethod(method.FullName))
                    continue;

                string cleanMethodName = GetCleanMethodName(method.Name);

                if (cleanInterfaceMethodName.Equals(cleanMethodName))
                {
                    if (interfaceMethod.Equals(method))
                    {
                        return method;
                    }
                }
            }

            if (type.BaseType != null)
            {
                methodFound = FindImplicitInterfaceMethod(type.BaseType, interfaceMethod);
            }

            return methodFound;
        }