public override object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data)
        {
            // Initialize resolver for method:
            if (!methodDeclaration.Body.IsNull)
            {
                if (resolver.Initialize(parseInformation, methodDeclaration.Body.StartLocation.Y, methodDeclaration.Body.StartLocation.X))
                {
                    resolver.RunLookupTableVisitor(methodDeclaration);
                }
            }
            IMethod currentMethod = resolver.CallingMember as IMethod;

            CreateInterfaceImplementations(currentMethod, methodDeclaration, methodDeclaration.InterfaceImplementations);
            if (currentMethod != null && currentMethod.Name == "Main")
            {
                if (currentMethod.DeclaringType.FullyQualifiedName == StartupObjectToMakePublic)
                {
                    if (currentMethod.IsStatic && currentMethod.IsPrivate)
                    {
                        methodDeclaration.Modifier &= ~Modifiers.Private;
                        methodDeclaration.Modifier |= Modifiers.Internal;
                    }
                }
            }
            return(base.VisitMethodDeclaration(methodDeclaration, data));
        }
        public override object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data)
        {
            // Initialize resolver for method:
            if (!methodDeclaration.Body.IsNull)
            {
                if (resolver.Initialize(parseInformation, methodDeclaration.Body.StartLocation.Line, methodDeclaration.Body.StartLocation.Column))
                {
                    resolver.RunLookupTableVisitor(methodDeclaration);
                }
            }

            methodDeclaration.HandlesClause.Clear();

            return(base.VisitMethodDeclaration(methodDeclaration, data));
        }
        public override object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data)
        {
            // Initialize resolver for method:
            if (!methodDeclaration.Body.IsNull)
            {
                if (resolver.Initialize(parseInformation, methodDeclaration.Body.StartLocation.Y, methodDeclaration.Body.StartLocation.X))
                {
                    resolver.RunLookupTableVisitor(methodDeclaration);
                }
            }
            IMethod currentMethod = resolver.CallingMember as IMethod;

            CreateInterfaceImplementations(currentMethod, methodDeclaration, methodDeclaration.InterfaceImplementations);
            // Make "Main" public
            if (currentMethod != null && currentMethod.Name == "Main")
            {
                if (currentMethod.DeclaringType.FullyQualifiedName == StartupObjectToMakePublic)
                {
                    if (currentMethod.IsStatic && currentMethod.IsPrivate)
                    {
                        methodDeclaration.Modifier &= ~Modifiers.Private;
                        methodDeclaration.Modifier |= Modifiers.Internal;
                    }
                }
            }
            if (resolver.CallingClass != null && resolver.CallingClass.BaseType != null)
            {
                // methods with the same name as a method in a base class must have 'Overloads'
                if ((methodDeclaration.Modifier & (Modifiers.Override | Modifiers.New)) == Modifiers.None)
                {
                    if (resolver.CallingClass.BaseType.GetMethods()
                        .Any(m => string.Equals(m.Name, methodDeclaration.Name, StringComparison.OrdinalIgnoreCase)))
                    {
                        methodDeclaration.Modifier |= Modifiers.Overloads;
                    }
                }
            }
            return(base.VisitMethodDeclaration(methodDeclaration, data));
        }