private static XAttribute GenerateTypeAccessModifier(TypeAccessModifierAnnotation annotation)
        {
            if (annotation == null)
            {
                return null;
            }

            AccessModifier typeAccessModifier = annotation.TypeAccessModifier;
            if (typeAccessModifier == AccessModifier.Unspecified)
            {
                return null;
            }

            return new XAttribute(EdmConstants.CodegenNamespace + "TypeAccess", annotation.TypeAccessModifier.ToString());
        }
        private static void ApplyTypeAccessModifier(CodeTypeDeclaration codeClass, TypeAccessModifierAnnotation typeAccessModifierAnnotation)
        {
            // Clear visibility attributes
            codeClass.TypeAttributes &= ~TypeAttributes.VisibilityMask;

            if (typeAccessModifierAnnotation != null && typeAccessModifierAnnotation.TypeAccessModifier == AccessModifier.Internal)
            {
                codeClass.TypeAttributes |= TypeAttributes.NotPublic;
            }
            else
            {
                // Default to public
                codeClass.TypeAttributes |= TypeAttributes.Public;
            }
        }