Fix enumerator issue with numerically keyed script tables
This commit is contained in:
parent
ff9eac888f
commit
0843c9b624
|
@ -19,10 +19,6 @@ namespace Upsilon.BaseTypes.ScriptTable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator<ScriptType> IEnumerable<ScriptType>.GetEnumerator()
|
|
||||||
{
|
|
||||||
return GetScriptEnumerator();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override System.Type GetCSharpType()
|
public override System.Type GetCSharpType()
|
||||||
{
|
{
|
||||||
|
@ -34,9 +30,17 @@ namespace Upsilon.BaseTypes.ScriptTable
|
||||||
return EvaluationScope.Variables.Select(x => x.Value.ToCSharpObject()).ToArray();
|
return EvaluationScope.Variables.Select(x => x.Value.ToCSharpObject()).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator GetEnumerator()
|
public IEnumerator<ScriptType> GetEnumerator()
|
||||||
{
|
{
|
||||||
return GetScriptEnumerator();
|
foreach (var variable in EvaluationScope.Variables)
|
||||||
|
{
|
||||||
|
yield return variable.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
|
{
|
||||||
|
return GetEnumerator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue