Microsoft.Zing.Checker.VisitMethod C# (CSharp) Méthode

VisitMethod() public méthode

public VisitMethod ( System.Compiler.Method method ) : System.Compiler.Method
method System.Compiler.Method
Résultat System.Compiler.Method
        public override Method VisitMethod(Method method)
        {
            ZMethod zMethod = base.VisitMethod(method) as ZMethod;

            if (zMethod == null)
                return null;

            if (zMethod.Activated)
            {
                if (!zMethod.IsStatic)
                {
                    this.HandleError(method, Error.ExpectedStaticMethod);
                    return null;
                }

                if (zMethod.ReturnType != SystemTypes.Void)
                {
                    this.HandleError(zMethod, Error.ExpectedVoidMethod);
                    return null;
                }
                if (zMethod.Parameters.Count != 0)
                {
                    this.HandleError(zMethod, Error.ExpectedParameterlessMethod);
                    return null;
                }
            }
            return zMethod;
        }