Example #1
0
        private static bool IsFlagsEnum(Type lmrType)
        {
            Debug.Assert(lmrType.IsEnum);

            var attributes = lmrType.GetCustomAttributesData();

            foreach (var attribute in attributes)
            {
                // NOTE: AttributeType is not available in 2.0
                if (attribute.Constructor.DeclaringType.FullName == "System.FlagsAttribute")
                {
                    return(true);
                }
            }

            return(false);
        }
        private static bool IsFlagsEnum(Type lmrType)
        {
            Debug.Assert(lmrType.IsEnum);

            var attributes = lmrType.GetCustomAttributesData();
            foreach (var attribute in attributes)
            {
                // NOTE: AttributeType is not available in 2.0
                if (attribute.Constructor.DeclaringType.FullName == "System.FlagsAttribute")
                {
                    return true;
                }
            }

            return false;
        }