private void RefreshFieldEnumerations()
{
for (int i = 0; i < Instances.Count && i < MAX_INSTANCES; i++)
{
var instance = Instances[i];
object target = null;
if (instance.Ref != null && instance.Ref.Target != null)
target = instance.Ref.Target;
var collection = GetFieldValue(target) as ICollection;
if (collection == null)
continue;
int x = 0;
var e = collection.GetEnumerator();
while (e.MoveNext())
{
var indexValue = e.Current;
if (Nodes.Count <= x)
AddRow(new FieldModel(Instance, this, RowTypes.Element, indexValue.GetType(), x));
if (x > 50)
break;
x++;
}
}
}