Example #1
0
        /// <summary>
        /// Analyze whether CLS-Compliant verification must be execute for this MemberCore.
        /// </summary>
        public override bool IsClsComplianceRequired()
        {
            if ((caching_flags & Flags.ClsCompliance_Undetected) == 0)
            {
                return((caching_flags & Flags.ClsCompliant) != 0);
            }

            caching_flags &= ~Flags.ClsCompliance_Undetected;

            if (HasClsCompliantAttribute)
            {
                if ((caching_flags & Flags.ClsCompliantAttributeFalse) != 0)
                {
                    return(false);
                }

                caching_flags |= Flags.ClsCompliant;
                return(true);
            }

            if (Parent.IsClsComplianceRequired())
            {
                caching_flags |= Flags.ClsCompliant;
                return(true);
            }

            return(false);
        }