Ejemplo n.º 1
0
 public unsafe T this[int index]
 {
     get
     {
         if (_OwnerObject.IsDead())
         {
             throw new Exceptions.SimObjectPointerInvalidException();
         }
         if (index >= _Count)
         {
             throw new IndexOutOfRangeException();
         }
         if (_GetterFunction != null)
         {
             return(_GetterFunction(_OwnerObject.ObjectPtr->ObjPtr, index));
         }
         T col = new T();
         _OutGetterFunction(_OwnerObject.ObjectPtr->ObjPtr, index, out col);
         return(col);
     }
     set
     {
         if (_OwnerObject.IsDead())
         {
             throw new Exceptions.SimObjectPointerInvalidException();
         }
         if (index >= _Count)
         {
             throw new IndexOutOfRangeException();
         }
         _SetterFunction(_OwnerObject.ObjectPtr->ObjPtr, index, value);
     }
 }