Ejemplo n.º 1
0
        public static bool IsBool(this IFieldSymbol field)
        {
            if (field.Type.Name != "Int32")
            {
                return(false);
            }
            string comment = field.GetComment();

            if (comment == null)
            {
                return(false);
            }

            return(comment.Contains("true", StringComparison.OrdinalIgnoreCase) ||
                   comment.Contains("false", StringComparison.OrdinalIgnoreCase));
        }