private bool WillRemoveFirstFieldInTypeDirectlyAboveProperty( ISyntaxFactsService syntaxFacts, TPropertyDeclaration property, SyntaxNode fieldToRemove) { if (fieldToRemove.Parent == property.Parent && fieldToRemove.Parent is TTypeDeclarationSyntax typeDeclaration) { var members = syntaxFacts.GetMembersOfTypeDeclaration(typeDeclaration); return(members[0] == fieldToRemove && members[1] == property); } return(false); }