From f18fa1dbf23d10ec55be03e188cd7cbd3fc8e5b8 Mon Sep 17 00:00:00 2001 From: Tomasz Malik Date: Thu, 18 Jan 2024 01:04:59 +0100 Subject: [PATCH] chore: netstandard2.0 support --- .../Expressions/Visitors/ExpressionBuilder.cs | 6 +++++- src/TagBites.Expressions/TagBites.Expressions.csproj | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/TagBites.Expressions/Expressions/Visitors/ExpressionBuilder.cs b/src/TagBites.Expressions/Expressions/Visitors/ExpressionBuilder.cs index 972a3a4..c8aca90 100644 --- a/src/TagBites.Expressions/Expressions/Visitors/ExpressionBuilder.cs +++ b/src/TagBites.Expressions/Expressions/Visitors/ExpressionBuilder.cs @@ -502,11 +502,15 @@ public ExpressionBuilder(ExpressionParserOptions options) var oldExtensionInstance = _extensionInstance; _extensionInstance = instanceExpression; + try { if (TryResolveMethodCall(node, null, parameters, methods, out var expression)) return expression; } - _extensionInstance = oldExtensionInstance; + finally + { + _extensionInstance = oldExtensionInstance; + } } } diff --git a/src/TagBites.Expressions/TagBites.Expressions.csproj b/src/TagBites.Expressions/TagBites.Expressions.csproj index e8aec67..422bed2 100644 --- a/src/TagBites.Expressions/TagBites.Expressions.csproj +++ b/src/TagBites.Expressions/TagBites.Expressions.csproj @@ -2,7 +2,7 @@ - netstandard2.1 + netstandard2.0 true