diff --git a/src/ExpressionEvaluator/Core/Source/ExpressionCompiler/EvaluationContextBase.cs b/src/ExpressionEvaluator/Core/Source/ExpressionCompiler/EvaluationContextBase.cs
index 85a2b5e107b7085202c32fddf0701cb670c2b652..8f018b92dda4affc31b8e70177fc51d21ef80d23 100644
--- a/src/ExpressionEvaluator/Core/Source/ExpressionCompiler/EvaluationContextBase.cs
+++ b/src/ExpressionEvaluator/Core/Source/ExpressionCompiler/EvaluationContextBase.cs
@@ -21,39 +21,6 @@ internal abstract class EvaluationContextBase
internal static readonly AssemblyIdentity SystemXmlLinqIdentity = new AssemblyIdentity("System.Xml.Linq");
internal static readonly AssemblyIdentity MicrosoftVisualBasicIdentity = new AssemblyIdentity("Microsoft.VisualBasic");
- ///
- /// Compile C# expression and emit assembly with evaluation method.
- ///
- ///
- /// Result containing generated assembly, type and method names, and any format specifiers.
- ///
- internal CompileResult CompileExpression(
- InspectionContext inspectionContext,
- string expr,
- DkmEvaluationFlags compilationFlags,
- DiagnosticFormatter formatter,
- out ResultProperties resultProperties,
- out string error,
- out ImmutableArray missingAssemblyIdentities,
- CultureInfo preferredUICulture,
- CompilationTestData testData)
- {
- var diagnostics = DiagnosticBag.GetInstance();
- var result = this.CompileExpression(inspectionContext, expr, compilationFlags, diagnostics, out resultProperties, testData);
- if (diagnostics.HasAnyErrors())
- {
- bool useReferencedModulesOnly;
- error = GetErrorMessageAndMissingAssemblyIdentities(diagnostics, formatter, preferredUICulture, out useReferencedModulesOnly, out missingAssemblyIdentities);
- }
- else
- {
- error = null;
- missingAssemblyIdentities = ImmutableArray.Empty;
- }
- diagnostics.Free();
- return result;
- }
-
internal abstract CompileResult CompileExpression(
InspectionContext inspectionContext,
string expr,
diff --git a/src/ExpressionEvaluator/Core/Test/ExpressionCompiler/ExpressionCompilerTestHelpers.cs b/src/ExpressionEvaluator/Core/Test/ExpressionCompiler/ExpressionCompilerTestHelpers.cs
index 8d94b1f32121f5427b8cf00fb28896cd1c8cbd7b..e93f2b0593d3bc7498ce2b1ac0547bf4bea575cf 100644
--- a/src/ExpressionEvaluator/Core/Test/ExpressionCompiler/ExpressionCompilerTestHelpers.cs
+++ b/src/ExpressionEvaluator/Core/Test/ExpressionCompiler/ExpressionCompilerTestHelpers.cs
@@ -106,6 +106,40 @@ internal static class ExpressionCompilerTestHelpers
return result;
}
+ ///
+ /// Compile C# expression and emit assembly with evaluation method.
+ ///
+ ///
+ /// Result containing generated assembly, type and method names, and any format specifiers.
+ ///
+ static internal CompileResult CompileExpression(
+ this EvaluationContextBase evaluationContext,
+ InspectionContext inspectionContext,
+ string expr,
+ DkmEvaluationFlags compilationFlags,
+ DiagnosticFormatter formatter,
+ out ResultProperties resultProperties,
+ out string error,
+ out ImmutableArray missingAssemblyIdentities,
+ CultureInfo preferredUICulture,
+ CompilationTestData testData)
+ {
+ var diagnostics = DiagnosticBag.GetInstance();
+ var result = evaluationContext.CompileExpression(inspectionContext, expr, compilationFlags, diagnostics, out resultProperties, testData);
+ if (diagnostics.HasAnyErrors())
+ {
+ bool useReferencedModulesOnly;
+ error = evaluationContext.GetErrorMessageAndMissingAssemblyIdentities(diagnostics, formatter, preferredUICulture, out useReferencedModulesOnly, out missingAssemblyIdentities);
+ }
+ else
+ {
+ error = null;
+ missingAssemblyIdentities = ImmutableArray.Empty;
+ }
+ diagnostics.Free();
+ return result;
+ }
+
internal static CompileResult CompileExpressionWithRetry(
ImmutableArray metadataBlocks,
EvaluationContextBase context,