Пример #1
0
 public TRet GetReference <TRet>(int index, Reference.OutFunc <T, TRet> func)
 {
     if (index < 0 || index >= count)
     {
         throw new ArgumentOutOfRangeException("index");
     }
     return(func(out _items[index]));
 }
Пример #2
0
 public TRet GetReference <TRet>(Reference.OutFunc <T, TRet> func)
 {
     return(GetReference <TRet>(tr => tr.AsRef(Reference.OutToRefFunc(func))));
 }
Пример #3
0
 /// <summary>
 /// Obtains a reference to an element in this array.
 /// </summary>
 public TRet GetReference <TRet>(int index, Reference.OutFunc <T, TRet> func)
 {
     return(func(out array[index].Value));
 }
Пример #4
0
 public TRet GetReference <TRet>(Reference.OutFunc <T, TRet> func)
 {
     return(Reference.GetBoxedData(Instance, Reference.OutToRefFunc(func)));
 }