Exemplo n.º 1
0
        private bool AreAllEnclosingClassesPublic(IMemberDeclaration memberDeclaration)
        {
            IClassDeclaration enclosingTypeDeclaration = memberDeclaration.EnclosingClass;
            bool isEnclosingClassPublic = enclosingTypeDeclaration.IsPublic();

            while (isEnclosingClassPublic && enclosingTypeDeclaration.EnclosingClass.Exists)
            {
                enclosingTypeDeclaration = enclosingTypeDeclaration.EnclosingClass;
                isEnclosingClassPublic   = enclosingTypeDeclaration.IsPublic();
            }
            return(isEnclosingClassPublic);
        }