private static object[] UnwrapArray(object annotation)
{
// TODO make sure the descriptor is correct
object[] arr = (object[])annotation;
for (int i = 2; i < arr.Length; i += 2)
{
if ("value".Equals(arr[i]))
{
object[] value = (object[])arr[i + 1];
object[] rc = new object[value.Length - 1];
Array.Copy(value, 1, rc, 0, rc.Length);
return rc;
}
}
return new object[0];
}