Пример #1
0
        public static T[] GetListFromAEDesc <T, TRef> (ref AEDesc list, AEDescValueSelector <TRef, T> sel, OSType type)
            where TRef : struct
        {
            long count = AppleEvent.AECountItems(ref list);

            T[] arr = new T[count];
            for (int i = 1; i <= count; i++)
            {
                TRef r = AppleEvent.AEGetNthPtr <TRef> (ref list, i, type);
                arr [i - 1] = sel(ref r);
            }
            return(arr);
        }