public override void VisitClassDeclaration(ClassDeclarationSyntax node) { IImmutableList <ITypeSymbol> baseTypes = SemanticModel.GetAllBaseTypeSymbols(node); bool isController = baseTypes.Any(t => t.Equals(KnownTypes.Controller)); if (!isController) { return; } IImmutableList <AttributeUsageInfo> attributeInfo = SemanticModel.GetAttributeInfo(node.AttributeLists); bool isVersioned = attributeInfo.Any(info => info.AttributeType.Equals(KnownTypes.ApiVersionAttribute)); if (!isVersioned) { return; } base.VisitClassDeclaration(node); }