Skip to content

Commit

Permalink
Merge pull request #330 from UiPath/fix/revert_process_locations
Browse files Browse the repository at this point in the history
Revert "Merge pull request #328 from UiPath/fix/validation_optimizati…
  • Loading branch information
andreeadumitru authored Jul 10, 2024
2 parents 4a2395d + 3624324 commit f215c5e
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class CompiledExpressionInvoker
private readonly IList<LocationReference> _locationReferences;
private CodeActivityMetadata _metadata;
private CodeActivityPublicEnvironmentAccessor _accessor;
private bool _locationsInitialized;

public CompiledExpressionInvoker(ITextExpression expression, bool isReference, CodeActivityMetadata metadata)
{
Expand All @@ -41,10 +40,7 @@ public CompiledExpressionInvoker(ITextExpression expression, bool isReference, C

_metadataRoot = metadata.Environment.Root;

if (!metadata.Environment.IsValidating)
{
ProcessLocationReferences();
}
ProcessLocationReferences();
}

public object InvokeExpression(ActivityContext activityContext)
Expand All @@ -54,11 +50,6 @@ public object InvokeExpression(ActivityContext activityContext)
throw FxTrace.Exception.ArgumentNull(nameof(activityContext));
}

if (!_locationsInitialized)
{
ProcessLocationReferences();
}

if (_compiledRoot == null || _expressionId < 0)
{
if (!TryGetCompiledExpressionRoot(_expressionActivity, _metadataRoot, out _compiledRoot) ||
Expand Down Expand Up @@ -163,11 +154,6 @@ internal static bool TryGetCompiledExpressionRoot(Activity target, bool forImple

internal Expression GetExpressionTree()
{
if (!_locationsInitialized)
{
ProcessLocationReferences();
}

if (_compiledRoot == null || _expressionId < 0)
{
if (!TryGetCompiledExpressionRootAtDesignTime(_expressionActivity, _metadataRoot, out _compiledRoot, out _expressionId))
Expand Down Expand Up @@ -212,8 +198,6 @@ private bool CanExecuteExpression(ICompiledExpressionRoot compiledExpressionRoot

private void ProcessLocationReferences()
{
_locationsInitialized = true;

Stack<LocationReferenceEnvironment> environments = new();
//
// Build list of location by enumerating environments
Expand Down

0 comments on commit f215c5e

Please sign in to comment.