From e4cefb4d932a308de4e1adac1a2b5141b478d064 Mon Sep 17 00:00:00 2001 From: "mircea.arhip@uipath.com" Date: Tue, 25 Jul 2023 15:54:39 +0300 Subject: [PATCH] fix: allow validator overrides --- src/UiPath.Workflow/Validation/CSharpExpressionValidator.cs | 4 ++-- src/UiPath.Workflow/Validation/VBExpressionValidator.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/UiPath.Workflow/Validation/CSharpExpressionValidator.cs b/src/UiPath.Workflow/Validation/CSharpExpressionValidator.cs index b5c04c59..f58ce1ac 100644 --- a/src/UiPath.Workflow/Validation/CSharpExpressionValidator.cs +++ b/src/UiPath.Workflow/Validation/CSharpExpressionValidator.cs @@ -49,7 +49,7 @@ public class CSharpExpressionValidator : RoslynExpressionValidator /// /// Singleton instance of the default validator. /// - public static CSharpExpressionValidator Instance => s_instance.Value; + public static CSharpExpressionValidator Instance { get; set; } = s_instance.Value; protected override CompilerHelper CompilerHelper { get; } = new CSharpCompilerHelper(); @@ -61,7 +61,7 @@ public class CSharpExpressionValidator : RoslynExpressionValidator /// /// Assemblies to seed the collection. /// - private CSharpExpressionValidator(HashSet referencedAssemblies) + protected CSharpExpressionValidator(HashSet referencedAssemblies) : base(referencedAssemblies != null ? new HashSet(s_defaultReferencedAssemblies.Union(referencedAssemblies)) : s_defaultReferencedAssemblies) diff --git a/src/UiPath.Workflow/Validation/VBExpressionValidator.cs b/src/UiPath.Workflow/Validation/VBExpressionValidator.cs index 659826a2..3a3465eb 100644 --- a/src/UiPath.Workflow/Validation/VBExpressionValidator.cs +++ b/src/UiPath.Workflow/Validation/VBExpressionValidator.cs @@ -45,7 +45,7 @@ public class VbExpressionValidator : RoslynExpressionValidator /// /// Assemblies to seed the collection. /// - private VbExpressionValidator(HashSet referencedAssemblies) + protected VbExpressionValidator(HashSet referencedAssemblies) : base(referencedAssemblies != null ? new HashSet(s_defaultReferencedAssemblies.Union(referencedAssemblies)) : s_defaultReferencedAssemblies) @@ -56,7 +56,7 @@ private VbExpressionValidator(HashSet referencedAssemblies) /// /// Singleton instance of the default validator. /// - public static VbExpressionValidator Instance => s_instance.Value; + public static VbExpressionValidator Instance { get; set; } = s_instance.Value; protected override CompilerHelper CompilerHelper { get; } = new VBCompilerHelper();