private static IHeapConnector CreateNumRectArray(IHeapManagerInternals heapMgr, int count) { IHeapConnector retObj = heapMgr.NewArray(heapMgr.GetHeapType("numrect").ID, count); for (int i = 0; i < count; i++) { ((IValueWrite <RCNumRectangle>)retObj.AccessArrayItem(i)).Write(new RCNumRectangle(i, i + 1, i + 2, i + 3)); } return(retObj); }
private static IHeapConnector CreateNumArray(IHeapManagerInternals heapMgr, int count) { IHeapConnector retObj = heapMgr.NewArray(heapMgr.GetHeapType("num").ID, count); for (int i = 0; i < count; i++) { ((IValueWrite <RCNumber>)retObj.AccessArrayItem(i)).Write((RCNumber)i); } return(retObj); }
private static void GetIDs(IHeapManagerInternals heapMgr) { testType = heapMgr.GetHeapType("TestType"); TESTTYPE_BYTEARRAY_IDX = testType.GetFieldIdx("ByteArray"); TESTTYPE_SHORTARRAY_IDX = testType.GetFieldIdx("ShortArray"); TESTTYPE_INTARRAY_IDX = testType.GetFieldIdx("IntArray"); TESTTYPE_LONGARRAY_IDX = testType.GetFieldIdx("LongArray"); TESTTYPE_NUMARRAY_IDX = testType.GetFieldIdx("NumArray"); TESTTYPE_INTVECTARRAY_IDX = testType.GetFieldIdx("IntVectArray"); TESTTYPE_NUMVECTARRAY_IDX = testType.GetFieldIdx("NumVectArray"); TESTTYPE_INTRECTARRAY_IDX = testType.GetFieldIdx("IntRectArray"); TESTTYPE_NUMRECTARRAY_IDX = testType.GetFieldIdx("NumRectArray"); TESTTYPE_NEXT_IDX = testType.GetFieldIdx("Next"); }