This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Linq.Expressions; | |
| namespace Timespace.Api.Database.Extensions; | |
| internal sealed class ReplacingExpressionVisitor(Expression oldExpression, Expression newExpression) : ExpressionVisitor | |
| { | |
| public override Expression? Visit(Expression? node) | |
| { | |
| // If the current node is the one we're looking for, return the new expression. | |
| return node == oldExpression ? newExpression : base.Visit(node); |
OlderNewer