public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration) { if (methodDeclaration.IsPublic()) { methodDeclaration.Body = null; } else { methodDeclaration.Remove(); } }