public object this[int index] { get { index = PythonOps.FixIndex(index, ((ArrayType)NativeType).Length); INativeType elementType = ElementType; return(elementType.GetValue( MemHolder, this, checked (index * elementType.Size), false )); } set { index = PythonOps.FixIndex(index, ((ArrayType)NativeType).Length); INativeType elementType = ElementType; object keepAlive = elementType.SetValue( MemHolder, checked (index * elementType.Size), value ); if (keepAlive != null) { MemHolder.AddObject(index.ToString(), keepAlive); } } }
public void Setvalue(object value) { NativeType.SetValue(MemHolder, 0, value); if (IsString) { MemHolder.AddObject("str", value); } }
public object this[int index] { get { INativeType type = ((PointerType)NativeType)._type; MemoryHolder address = MemHolder.ReadMemoryHolder(0); return(type.GetValue(address, this, checked (type.Size * index), false)); } set { MemoryHolder address = MemHolder.ReadMemoryHolder(0); INativeType type = ((PointerType)NativeType)._type; object keepAlive = type.SetValue(address, checked (type.Size * index), value); if (keepAlive != null) { MemHolder.AddObject(index.ToString(), keepAlive); } } }