public static bool IsDisposeCallFor(this MemberAccessExpressionSyntax memberAccessExpression, string variableName) { return(memberAccessExpression != null && memberAccessExpression.IsDisposeCall() && (memberAccessExpression.Expression as IdentifierNameSyntax)?.Identifier.Text == variableName); }