Esempio n. 1
0
        public static bool HasAttributePropertySet(this SyntaxList <AttributeListSyntax> attributeListSyntaxes, string propertyName, bool defaultValue)
        {
            var attributeIncludeTypeName = attributeListSyntaxes.GetSerializerAttribute();

            if (attributeIncludeTypeName == null)
            {
                return(defaultValue);
            }

            var attributeIncludeTypeNameArgument = attributeIncludeTypeName.GetArgument(propertyName);

            if (attributeIncludeTypeNameArgument == null)
            {
                return(defaultValue);
            }

            return(attributeIncludeTypeNameArgument.IsTrue());
        }