Exemplo n.º 1
0
        private void AddMissingInterfaceMethods()
        {
            if (!m_baseType.IsInterface)
            {
                return;
            }

            foreach (var methodInfo in m_baseType.GetMethods())
            {
                var exists = false;
                foreach (var declaration in m_methodDeclarations)
                {
                    if (declaration.Identifier.ToFullString() == methodInfo.Name)
                    {
                        exists = true;
                        break;
                    }
                }

                if (exists)
                {
                    continue;
                }

                // isSpecialName is true for properties
                var attr = methodInfo.GetCustomAttribute <VisualScriptingMember>();
                if (attr == null || attr.Reserved || methodInfo.IsSpecialName)
                {
                    continue;
                }
                // Create missing syntax
                m_methodDeclarations.Add(MySyntaxFactory.MethodDeclaration(methodInfo));
            }
        }