Благодарю Вас, b_nosoff
Вы мне очень помогли.
Привожу код рабочего метода, в котором получаю XML-текст первого документа.
Мне нужен цикл, его, естественно, доделаю.
Очень благодарен всем, кто помог!
docum - это класс документа, определённый в сборке (TMSoft.Gohub.Client.GohubDocument)
X++:
con = new TMSoft.Gohub.Client.GohubConnection("localhost", 20295);
CLRenumerable = con.QueryDocuments(0);
// Получить тип
//enumerable = CLRenumerable.GetType();
enumerable = System.Type::GetType("System.Collections.IEnumerable");
if (CLRInterop::isNull(enumerable)) // false
throw error("null");
methodInfo = enumerable.GetMethod("GetEnumerator");
/*if (CLRInterop::isNull(methodInfo)) // true
throw error("null");*/
CLRenumerator = methodInfo.Invoke(CLRenumerable, nil);
if (CLRInterop::isNull(CLRenumerator))
throw error("null");
enumerator = System.Type::GetType("System.Collections.IEnumerator");
methodInfo = enumerator.GetMethod("MoveNext");
// Переход к первому элементу
b = methodInfo.Invoke(CLRenumerator, nil);
// считывание текущего элемента
if (b)
{
// Сичтываю свойство с текущим документом
ParameterInfo = enumerator.GetProperty("Current");
// Получение текущего элемента
docum = ParameterInfo.GetValue(CLRenumerator, nil);
// ПОлучение документа в формате XML
info(docum.GetXmlText());
}