public Value[] GetValues (IList<FieldInfoMirror> fields, ThreadMirror thread) {
if (fields == null)
throw new ArgumentNullException ("fields");
foreach (FieldInfoMirror f in fields) {
if (f == null)
throw new ArgumentNullException ("field");
CheckMirror (f);
}
long[] ids = new long [fields.Count];
for (int i = 0; i < fields.Count; ++i)
ids [i] = fields [i].Id;
try {
return vm.DecodeValues (vm.conn.Type_GetValues (id, ids, thread != null ? thread.Id : 0));
} catch (CommandException ex) {
if (ex.ErrorCode == ErrorCode.INVALID_FIELDID)
throw new ArgumentException ("One of the fields is not valid for this type.", "fields");
else
throw;
}
}