public override HashSet <ISymbol> GetAnalyzableSymbols(SymbolAnalysisContext context, INamedTypeSymbol containingType) { HashSet <ISymbol> properties = null; ImmutableArray <ISymbol> members = containingType.GetMembers(); for (int i = 0; i < members.Length; i++) { if (members[i].IsProperty()) { var propertySymbol = (IPropertySymbol)members[i]; if (!propertySymbol.IsIndexer && !propertySymbol.IsReadOnly && !propertySymbol.IsImplicitlyDeclared && propertySymbol.ExplicitInterfaceImplementations.IsDefaultOrEmpty && !propertySymbol.HasAttributeByMetadataName(MetadataNames.System_Runtime_Serialization_DataMemberAttribute, context.Compilation)) { IMethodSymbol setMethod = propertySymbol.SetMethod; if (setMethod?.IsPrivate() == true) { var accessor = setMethod.GetFirstSyntaxOrDefault(context.CancellationToken) as AccessorDeclarationSyntax; if (accessor != null && accessor.BodyOrExpressionBody() == null) { (properties ?? (properties = new HashSet <ISymbol>())).Add(propertySymbol); } } } } } return(properties); }