public void Reclaim(FinalThing2 o) { if (o != null) { o.IntValue2a = default(int); this.instantiator.DiscardFinalThing2(o); } }
public byte[] Energize(FinalThing2 o) { int index = 0; Energize(o, bytes, ref index, true); byte[] result = this.instantiator.AcquireByteArray(index); Buffer.BlockCopy(bytes, 0, result, 0, index); return(result); }
public void Energize(FinalThing2 o, byte[] bytes, ref int index, bool writeTypeId) { if (writeTypeId) { bytes[index++] = 23; } // PRIMITIVE: IntValue1 bytes[index++] = (byte)((o.IntValue1 >> 24) & 255); bytes[index++] = (byte)((o.IntValue1 >> 16) & 255); bytes[index++] = (byte)((o.IntValue1 >> 8) & 255); bytes[index++] = (byte)(o.IntValue1 & 255); // PRIMITIVE: IntValue2a bytes[index++] = (byte)((o.IntValue2a >> 24) & 255); bytes[index++] = (byte)((o.IntValue2a >> 16) & 255); bytes[index++] = (byte)((o.IntValue2a >> 8) & 255); bytes[index++] = (byte)(o.IntValue2a & 255); }
public void DiscardFinalThing2(FinalThing2 o) { // Dispose? }
public object Energize(byte[] bytes, ref int index, ushort typeId) { switch (typeId) { case 11: { Thing o = this.instantiator.AcquireThing(); // PRIMITIVE: IntValue o.IntValue = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); return(o); } case 12: { // NULL FLAGS int nullFlagsIndex = index - 1; index += 1; FinalObject o = this.instantiator.AcquireFinalObject(); nullFlagsIndex++; // REFERENCE: ThingValue if ((bytes[nullFlagsIndex] & (byte)128) > 0) { o.ThingValue = (Thing)Energize(bytes, ref index, 11); } return(o); } case 22: { FinalThing1 o = this.instantiator.AcquireFinalThing1(); // PRIMITIVE: IntValue1 o.IntValue1 = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); // PRIMITIVE: IntValue2a o.IntValue2a = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); return(o); } case 23: { FinalThing2 o = this.instantiator.AcquireFinalThing2(); // PRIMITIVE: IntValue1 o.IntValue1 = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); // PRIMITIVE: IntValue2a o.IntValue2a = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); return(o); } case 24: { // NULL FLAGS int nullFlagsIndex = index - 1; index += 1; AbstractReferenceObject o = this.instantiator.AcquireAbstractReferenceObject(); nullFlagsIndex++; // REFERENCE: Thing if ((bytes[nullFlagsIndex] & (byte)128) > 0) { o.Thing = (AbstractThing)Energize(bytes, ref index); } return(o); } default: throw new ReferenceTestPatternBufferException("Unrecognized type ID: " + typeId + " "); } }
public object Energize(byte[] bytes, ref int index) { ulong vuread_e2gF4LLKmgmj = 0; for (int i_bUcUI05wA86c = 0; i_bUcUI05wA86c < 9; i_bUcUI05wA86c++) { byte b = bytes[index++]; if (i_bUcUI05wA86c < 8) { vuread_e2gF4LLKmgmj += (((ulong)b & (ulong)127) << (7 * i_bUcUI05wA86c)); if ((int)(b & 128) == 0) { break; } } else { vuread_e2gF4LLKmgmj += (ulong)b << (7 * i_bUcUI05wA86c); break; } } ushort typeId = (ushort)vuread_e2gF4LLKmgmj; switch (typeId) { case 11: { Thing o = this.instantiator.AcquireThing(); // PRIMITIVE: IntValue o.IntValue = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); return(o); } case 12: { // NULL FLAGS int nullFlagsIndex = index - 1; index += 1; FinalObject o = this.instantiator.AcquireFinalObject(); nullFlagsIndex++; // REFERENCE: ThingValue if ((bytes[nullFlagsIndex] & (byte)128) > 0) { o.ThingValue = (Thing)Energize(bytes, ref index, 11); } return(o); } case 22: { FinalThing1 o = this.instantiator.AcquireFinalThing1(); // PRIMITIVE: IntValue1 o.IntValue1 = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); // PRIMITIVE: IntValue2a o.IntValue2a = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); return(o); } case 23: { FinalThing2 o = this.instantiator.AcquireFinalThing2(); // PRIMITIVE: IntValue1 o.IntValue1 = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); // PRIMITIVE: IntValue2a o.IntValue2a = (int)( ((int)bytes[index++] << 24) | ((int)bytes[index++] << 16) | ((int)bytes[index++] << 8) | (int)bytes[index++] ); return(o); } case 24: { // NULL FLAGS int nullFlagsIndex = index - 1; index += 1; AbstractReferenceObject o = this.instantiator.AcquireAbstractReferenceObject(); nullFlagsIndex++; // REFERENCE: Thing if ((bytes[nullFlagsIndex] & (byte)128) > 0) { o.Thing = (AbstractThing)Energize(bytes, ref index); } return(o); } default: throw new ReferenceTestPatternBufferException("Unrecognized type ID: " + typeId + " "); } }