コード例 #1
0
        public long GetId(long objectId)
        {
            if (!this.fullDeserialization)
            {
                this.InitFullDeserialization();
            }
            if (objectId > 0L)
            {
                return(objectId);
            }
            if (!this.oldFormatDetected && (objectId != -1L))
            {
                return(-1L * objectId);
            }
            this.oldFormatDetected = true;
            if (this.valTypeObjectIdTable == null)
            {
                this.valTypeObjectIdTable = new IntSizedArray();
            }
            long num = valTypeObjectIdTable[(int)objectId];

            if (num == 0)
            {
                num = 0x7fffffffL + objectId;
                this.valTypeObjectIdTable[(int)objectId] = (int)num;
            }
            return(num);
        }
コード例 #2
0
 private IntSizedArray(IntSizedArray sizedArray)
 {
     this.objects    = new int[0x10];
     this.negObjects = new int[4];
     this.objects    = new int[sizedArray.objects.Length];
     sizedArray.objects.CopyTo(this.objects, 0);
     this.negObjects = new int[sizedArray.negObjects.Length];
     sizedArray.negObjects.CopyTo(this.negObjects, 0);
 }