GlueViewOfficialPlugins.Scripting.ExpressionParser.TryGetLocalVariableValue C# (CSharp) Method

TryGetLocalVariableValue() private method

private TryGetLocalVariableValue ( string name, object>.List localVariableStack, object &value ) : bool
name string
localVariableStack object>.List
value object
return bool
        private bool TryGetLocalVariableValue(string name, List<Dictionary<string, object>> localVariableStack, out object value)
        {
            value = null;
            if (localVariableStack != null)
            {
                foreach (var dictionary in localVariableStack)
                {
                    foreach (KeyValuePair<string, object> kvp in dictionary)
                    {
                        if (kvp.Key == name)
                        {
                            value = kvp.Value;
                            return true;
                        }
                    }
                }
            }
            return false;
        }