I'm trying to figure out there proper way to compare attribute data in Roslyn.
static bool ResolveAttributes(IMethodSymbol methodSymbol)
{
var attributes = methodSymbol.GetAttributes();
return null == attributes.FirstOrDefault(attr => isIDEMessageAttribute(attr, typeof(MyAttributeType)));
}
static bool IsIDEMessageAttribute(AttributeData attribute, Type desiredAttributeType)
{
//How can I check if the attribute is the type of desired?
}
How can I check if the attribute is the type of desired?