Skip to content

Commit

Permalink
Merge pull request #278 from UiPath/fix/currate_errors
Browse files Browse the repository at this point in the history
fix: allow validator overrides
  • Loading branch information
aoltean16 authored Jul 25, 2023
2 parents 88179a4 + e4cefb4 commit 7538ea5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/UiPath.Workflow/Validation/CSharpExpressionValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class CSharpExpressionValidator : RoslynExpressionValidator
/// <summary>
/// Singleton instance of the default validator.
/// </summary>
public static CSharpExpressionValidator Instance => s_instance.Value;
public static CSharpExpressionValidator Instance { get; set; } = s_instance.Value;

protected override CompilerHelper CompilerHelper { get; } = new CSharpCompilerHelper();

Expand All @@ -61,7 +61,7 @@ public class CSharpExpressionValidator : RoslynExpressionValidator
/// <param name="referencedAssemblies">
/// Assemblies to seed the collection.
/// </param>
private CSharpExpressionValidator(HashSet<Assembly> referencedAssemblies)
protected CSharpExpressionValidator(HashSet<Assembly> referencedAssemblies)
: base(referencedAssemblies != null
? new HashSet<Assembly>(s_defaultReferencedAssemblies.Union(referencedAssemblies))
: s_defaultReferencedAssemblies)
Expand Down
4 changes: 2 additions & 2 deletions src/UiPath.Workflow/Validation/VBExpressionValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class VbExpressionValidator : RoslynExpressionValidator
/// <param name="referencedAssemblies">
/// Assemblies to seed the collection.
/// </param>
private VbExpressionValidator(HashSet<Assembly> referencedAssemblies)
protected VbExpressionValidator(HashSet<Assembly> referencedAssemblies)
: base(referencedAssemblies != null
? new HashSet<Assembly>(s_defaultReferencedAssemblies.Union(referencedAssemblies))
: s_defaultReferencedAssemblies)
Expand All @@ -56,7 +56,7 @@ private VbExpressionValidator(HashSet<Assembly> referencedAssemblies)
/// <summary>
/// Singleton instance of the default validator.
/// </summary>
public static VbExpressionValidator Instance => s_instance.Value;
public static VbExpressionValidator Instance { get; set; } = s_instance.Value;

protected override CompilerHelper CompilerHelper { get; } = new VBCompilerHelper();

Expand Down

0 comments on commit 7538ea5

Please sign in to comment.