diff --git a/RDFSharp.Test/Query/Mirella/Algebra/Expressions/RDFSameTermExpressionTest.cs b/RDFSharp.Test/Query/Mirella/Algebra/Expressions/RDFSameTermExpressionTest.cs deleted file mode 100644 index 6c0090f6..00000000 --- a/RDFSharp.Test/Query/Mirella/Algebra/Expressions/RDFSameTermExpressionTest.cs +++ /dev/null @@ -1,471 +0,0 @@ -/* - Copyright 2012-2025 Marco De Salvo - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Collections.Generic; -using System.Data; -using RDFSharp.Model; -using RDFSharp.Query; - -namespace RDFSharp.Test.Query -{ - [TestClass] - public class RDFSameTermExpressionTest - { - #region Tests - [TestMethod] - public void ShouldCreateEESameTermExpression1() - { - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFAddExpression(new RDFVariable("?V1"), new RDFVariable("?V2")), - new RDFVariableExpression(new RDFVariable("?V3"))); - - Assert.IsNotNull(expression); - Assert.IsNotNull(expression.LeftArgument); - Assert.IsNotNull(expression.RightArgument); - Assert.IsTrue(expression.ToString().Equals("(SAMETERM((?V1 + ?V2), ?V3))")); - Assert.IsTrue(expression.ToString([]).Equals("(SAMETERM((?V1 + ?V2), ?V3))")); - } - - [TestMethod] - public void ShouldCreateEESameTermExpression2() - { - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFAddExpression(new RDFVariable("?V1"), new RDFVariable("?V2")), - new RDFConstantExpression(new RDFTypedLiteral("hello", RDFModelEnums.RDFDatatypes.XSD_STRING))); - - Assert.IsNotNull(expression); - Assert.IsNotNull(expression.LeftArgument); - Assert.IsNotNull(expression.RightArgument); - Assert.IsTrue(expression.ToString().Equals($"(SAMETERM((?V1 + ?V2), \"hello\"^^<{RDFVocabulary.XSD.STRING}>))")); - Assert.IsTrue(expression.ToString([]).Equals($"(SAMETERM((?V1 + ?V2), \"hello\"^^<{RDFVocabulary.XSD.STRING}>))")); - Assert.IsTrue(expression.ToString([RDFNamespaceRegister.GetByPrefix("xsd")]).Equals("(SAMETERM((?V1 + ?V2), \"hello\"^^xsd:string))")); - } - - [TestMethod] - public void ShouldCreateEESameTermExpressionNested() - { - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFAddExpression(new RDFVariable("?V1"), new RDFVariable("?V2")), - new RDFSameTermExpression(new RDFVariableExpression(new RDFVariable("?V3")), new RDFConstantExpression(new RDFPlainLiteral("hello","EN-US")))); - - Assert.IsNotNull(expression); - Assert.IsNotNull(expression.LeftArgument); - Assert.IsNotNull(expression.RightArgument); - Assert.IsTrue(expression.ToString().Equals("(SAMETERM((?V1 + ?V2), (SAMETERM(?V3, \"hello\"@EN-US))))")); - Assert.IsTrue(expression.ToString([]).Equals("(SAMETERM((?V1 + ?V2), (SAMETERM(?V3, \"hello\"@EN-US))))")); - } - - [TestMethod] - public void ShouldCreateEVSameTermExpression() - { - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFAddExpression(new RDFVariable("?V1"), new RDFVariable("?V2")), - new RDFVariable("?V3")); - - Assert.IsNotNull(expression); - Assert.IsNotNull(expression.LeftArgument); - Assert.IsNotNull(expression.RightArgument); - Assert.IsTrue(expression.ToString().Equals("(SAMETERM((?V1 + ?V2), ?V3))")); - Assert.IsTrue(expression.ToString([]).Equals("(SAMETERM((?V1 + ?V2), ?V3))")); - } - - [TestMethod] - public void ShouldCreateVESameTermExpression() - { - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?V3"), - new RDFAddExpression(new RDFVariable("?V1"), new RDFVariable("?V2"))); - - Assert.IsNotNull(expression); - Assert.IsNotNull(expression.LeftArgument); - Assert.IsNotNull(expression.RightArgument); - Assert.IsTrue(expression.ToString().Equals("(SAMETERM(?V3, (?V1 + ?V2)))")); - Assert.IsTrue(expression.ToString([]).Equals("(SAMETERM(?V3, (?V1 + ?V2)))")); - } - - [TestMethod] - public void ShouldCreateVVSameTermExpression() - { - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?V3"), - new RDFVariable("?V1")); - - Assert.IsNotNull(expression); - Assert.IsNotNull(expression.LeftArgument); - Assert.IsNotNull(expression.RightArgument); - Assert.IsTrue(expression.ToString().Equals("(SAMETERM(?V3, ?V1))")); - Assert.IsTrue(expression.ToString([]).Equals("(SAMETERM(?V3, ?V1))")); - } - - [TestMethod] - public void ShouldThrowExceptionOnCreatingEESameTermExpressionBecauseNullLeftArgument() - => Assert.ThrowsException(() => new RDFSameTermExpression(null as RDFExpression, new RDFVariableExpression(new RDFVariable("?V")))); - - [TestMethod] - public void ShouldThrowExceptionOnCreatingEVSameTermExpressionBecauseNullLeftArgument() - => Assert.ThrowsException(() => new RDFSameTermExpression(null as RDFExpression, new RDFVariable("?V"))); - - [TestMethod] - public void ShouldThrowExceptionOnCreatingVESameTermExpressionBecauseNullLeftArgument() - => Assert.ThrowsException(() => new RDFSameTermExpression(null as RDFVariable, new RDFVariableExpression(new RDFVariable("?V")))); - - [TestMethod] - public void ShouldThrowExceptionOnCreatingVVSameTermExpressionNullLeftArgument() - => Assert.ThrowsException(() => new RDFSameTermExpression(null as RDFVariable, new RDFVariable("?V"))); - - [TestMethod] - public void ShouldApplyExpressionWithEEAndCalculateResult() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFPlainLiteral("HELLO","EN-US"); - row["?B"] = new RDFPlainLiteral("HELLO","EN-US"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariableExpression(new RDFVariable("?A")), - new RDFVariableExpression(new RDFVariable("?B"))); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.True)); - } - - [TestMethod] - public void ShouldApplyExpressionWithEVAndCalculateResult() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFResource("http://example.org/test1"); - row["?B"] = new RDFResource("http://example.org/test1"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariableExpression(new RDFVariable("?A")), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.True)); - } - - [TestMethod] - public void ShouldApplyExpressionWithVEAndCalculateResult() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFResource("ex:org"); - row["?B"] = new RDFPlainLiteral("ex:org"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariableExpression(new RDFVariable("?B"))); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.True)); - } - - [TestMethod] - public void ShouldApplyExpressionWithVVAndCalculateResult() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFTypedLiteral("hello", RDFModelEnums.RDFDatatypes.RDFS_LITERAL); - row["?B"] = new RDFTypedLiteral("hello", RDFModelEnums.RDFDatatypes.RDFS_LITERAL); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.True)); - } - - [TestMethod] - public void ShouldApplyExpressionWithEEAndCalculateResultFalse() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFPlainLiteral("HELO", "EN-US"); - row["?B"] = new RDFPlainLiteral("LL"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariableExpression(new RDFVariable("?A")), - new RDFVariableExpression(new RDFVariable("?B"))); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.False)); - } - - [TestMethod] - public void ShouldApplyExpressionWithEVAndCalculateResultFalse() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFResource("http://e.org/test1"); - row["?B"] = new RDFResource("http://example.org/"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariableExpression(new RDFVariable("?A")), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.False)); - } - - [TestMethod] - public void ShouldApplyExpressionWithVEAndCalculateResultFalse() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFPlainLiteral("I am ex:Org literal"); - row["?B"] = new RDFResource("ex:org"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariableExpression(new RDFVariable("?B"))); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.False)); - } - - [TestMethod] - public void ShouldApplyExpressionWithVVAndCalculateResultFalse() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFTypedLiteral("helo", RDFModelEnums.RDFDatatypes.RDFS_LITERAL); - row["?B"] = new RDFTypedLiteral("helo", RDFModelEnums.RDFDatatypes.XSD_STRING); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.False)); - } - - [TestMethod] - public void ShouldApplyExpressionAndCalculateResultEvenOnNullLeft() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = null; - row["?B"] = new RDFPlainLiteral("hello").ToString(); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.False)); - } - - [TestMethod] - public void ShouldApplyExpressionAndCalculateResultEvenOnNullRight() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFPlainLiteral("hello").ToString(); - row["?B"] = null; - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.False)); - } - - [TestMethod] - public void ShouldApplyExpressionAndCalculateResultEvenOnNullLeftAndRight1() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = null; - row["?B"] = null; - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.True)); - } - - [TestMethod] - public void ShouldApplyExpressionAndCalculateResultEvenOnNullLeftAndRight2() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = null; - row["?B"] = RDFPlainLiteral.Empty; - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariable("?B")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNotNull(expressionResult); - Assert.IsTrue(expressionResult.Equals(RDFTypedLiteral.True)); - } - - [TestMethod] - public void ShouldApplyExpressionAndNotCalculateResultBecauseUnboundLeft() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - table.Columns.Add("?C", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFTypedLiteral("12", RDFModelEnums.RDFDatatypes.XSD_FLOAT); - row["?B"] = new RDFPlainLiteral("B"); - row["?C"] = new RDFPlainLiteral("C"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFAddExpression(new RDFVariable("?A"), new RDFVariable("?B")), - new RDFVariable("?C")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNull(expressionResult); - } - - [TestMethod] - public void ShouldApplyExpressionAndNotCalculateResultBecauseUnboundRight() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - table.Columns.Add("?C", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFTypedLiteral("12", RDFModelEnums.RDFDatatypes.XSD_FLOAT); - row["?B"] = new RDFPlainLiteral("B"); - row["?C"] = new RDFPlainLiteral("C"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?C"), - new RDFAddExpression(new RDFVariable("?A"), new RDFVariable("?B"))); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNull(expressionResult); - } - - [TestMethod] - public void ShouldApplyExpressionAndNotCalculateResultBecauseUnknownVariableLeft() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - table.Columns.Add("?C", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFTypedLiteral("12", RDFModelEnums.RDFDatatypes.XSD_FLOAT); - row["?B"] = new RDFPlainLiteral("B"); - row["?C"] = new RDFPlainLiteral("C"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?Q"), - new RDFVariable("?A")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNull(expressionResult); - } - - [TestMethod] - public void ShouldApplyExpressionAndNotCalculateResultBecauseUnknownVariableRight() - { - DataTable table = new DataTable(); - table.Columns.Add("?A", typeof(string)); - table.Columns.Add("?B", typeof(string)); - table.Columns.Add("?C", typeof(string)); - DataRow row = table.NewRow(); - row["?A"] = new RDFTypedLiteral("12", RDFModelEnums.RDFDatatypes.XSD_FLOAT); - row["?B"] = new RDFPlainLiteral("B"); - row["?C"] = new RDFPlainLiteral("C"); - table.Rows.Add(row); - table.AcceptChanges(); - - RDFSameTermExpression expression = new RDFSameTermExpression( - new RDFVariable("?A"), - new RDFVariable("?Q")); - RDFPatternMember expressionResult = expression.ApplyExpression(table.Rows[0]); - - Assert.IsNull(expressionResult); - } - #endregion - } -} \ No newline at end of file diff --git a/RDFSharp/Query/Mirella/Algebra/Expressions/RDFSameTermExpression.cs b/RDFSharp/Query/Mirella/Algebra/Expressions/RDFSameTermExpression.cs deleted file mode 100644 index 2771615c..00000000 --- a/RDFSharp/Query/Mirella/Algebra/Expressions/RDFSameTermExpression.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright 2012-2025 Marco De Salvo - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -using RDFSharp.Model; -using System; -using System.Collections.Generic; -using System.Data; -using System.Text; - -namespace RDFSharp.Query -{ - /// - /// RDFSameTermExpression represents an equality-checker function to be applied on a query results table. - /// - public class RDFSameTermExpression : RDFExpression - { - #region Ctors - /// - /// Default-ctor to build a sameTerm function with given arguments - /// - public RDFSameTermExpression(RDFExpression leftArgument, RDFExpression rightArgument) : base(leftArgument, rightArgument) { } - - /// - /// Default-ctor to build a sameTerm function with given arguments - /// - public RDFSameTermExpression(RDFExpression leftArgument, RDFVariable rightArgument) : base(leftArgument, rightArgument) { } - - /// - /// Default-ctor to build a sameTerm function with given arguments - /// - public RDFSameTermExpression(RDFVariable leftArgument, RDFExpression rightArgument) : base(leftArgument, rightArgument) { } - - /// - /// Default-ctor to build a a sameTerm function with given arguments - /// - public RDFSameTermExpression(RDFVariable leftArgument, RDFVariable rightArgument) : base(leftArgument, rightArgument) { } - #endregion - - #region Interfaces - /// - /// Gives the string representation of the sameTerm function - /// - public override string ToString() - => ToString(new List()); - internal override string ToString(List prefixes) - { - StringBuilder sb = new StringBuilder(); - - //(SAMETERM(L,R)) - sb.Append("(SAMETERM("); - if (LeftArgument is RDFExpression expLeftArgument) - sb.Append(expLeftArgument.ToString(prefixes)); - else - sb.Append(RDFQueryPrinter.PrintPatternMember((RDFPatternMember)LeftArgument, prefixes)); - sb.Append(", "); - if (RightArgument is RDFExpression expRightArgument) - sb.Append(expRightArgument.ToString(prefixes)); - else - sb.Append(RDFQueryPrinter.PrintPatternMember((RDFPatternMember)RightArgument, prefixes)); - sb.Append("))"); - - return sb.ToString(); - } - #endregion - - #region Methods - /// - /// Applies the sameTerm function on the given datarow - /// - internal override RDFPatternMember ApplyExpression(DataRow row) - { - RDFTypedLiteral expressionResult = null; - - #region Guards - if (LeftArgument is RDFVariable && !row.Table.Columns.Contains(LeftArgument.ToString())) - return expressionResult; - if (RightArgument is RDFVariable && !row.Table.Columns.Contains(RightArgument.ToString())) - return expressionResult; - #endregion - - try - { - #region Evaluate Arguments - //Evaluate left argument (Expression VS Variable) - RDFPatternMember leftArgumentPMember = null; - if (LeftArgument is RDFExpression leftArgumentExpression) - leftArgumentPMember = leftArgumentExpression.ApplyExpression(row); - else - leftArgumentPMember = RDFQueryUtilities.ParseRDFPatternMember(row[LeftArgument.ToString()].ToString()); - - //Evaluate right argument (Expression VS Variable) - RDFPatternMember rightArgumentPMember = null; - if (RightArgument is RDFExpression rightArgumentExpression) - rightArgumentPMember = rightArgumentExpression.ApplyExpression(row); - else - rightArgumentPMember = RDFQueryUtilities.ParseRDFPatternMember(row[RightArgument.ToString()].ToString()); - #endregion - - #region Calculate Result - if (leftArgumentPMember != null && rightArgumentPMember != null) - expressionResult = string.Equals(leftArgumentPMember.ToString(), rightArgumentPMember.ToString(), StringComparison.Ordinal) ? RDFTypedLiteral.True : RDFTypedLiteral.False; - #endregion - } - catch { /* Just a no-op, since type errors are normal when trying to face variable's bindings */ } - - return expressionResult; - } - #endregion - } -} \ No newline at end of file