public static bool IsKnownType(this ObjectCreationExpressionSyntax objectCreation, KnownType knownType, SemanticModel semanticModel) => objectCreation.Type.GetName().EndsWith(knownType.ShortName) && SymbolHelper.IsKnownType(objectCreation, knownType, semanticModel);
public static bool IsKnownType(this AttributeSyntax attribute, KnownType knownType, SemanticModel semanticModel) => attribute.Name.GetName().Contains(GetShortNameWithoutAttributeSuffix(knownType)) && SymbolHelper.IsKnownType(attribute, knownType, semanticModel);