Add comment explaining how the marshalling of arrays works (#15513)

This commit is contained in:
Marius Ungureanu 2022-07-15 20:12:51 +03:00 коммит произвёл GitHub
Родитель c324882fba
Коммит 250cb8807d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -187,6 +187,11 @@ namespace Security {
status = SecItem.SecItemCopyMatching (copy.Handle, out var ptr);
n = null;
if (status == SecStatusCode.Success){
// From the header docs, it's guaranteed the function will return an array only if we pass max > 1.
// By default, this function returns only the first match found.
// To obtain more than one matching item at a time, specify the search key kSecMatchLimit with a value greater than 1.
// The result will be an object of type CFArrayRef containing up to that number of matching items.
if (max == 1)
return new NSData [] { Runtime.GetNSObject<NSData> (ptr, true)! };