return new SequenceExtent(values);
} else if (CLI_IENUMERABLE.IsAssignableFrom(returnType)) {
// the difference here is we don't know the expected type of the elements
IEnumerator enumerator = ((IEnumerable) result).GetEnumerator();
List values = new ArrayList(20);
while (enumerator.MoveNext()) {
values.add(convertFromDotNet(enumerator.get_Current(), CLI_OBJECT, context));
}
return new SequenceExtent(values);
} else {
return new DotNetObjectValue(result);