public virtual void Defragment(IDefragmentContext context) { int payLoadOffSet = context.ReadInt(); if (payLoadOffSet == 0) { return; } int savedOffSet = context.Offset(); context.Seek(payLoadOffSet); try { int classMetadataId = context.CopyIDReturnOriginalID(); ITypeHandler4 typeHandler = CorrectTypeHandlerVersionFor(context, classMetadataId ); if (typeHandler == null) { return; } SeekSecondaryOffset(context, typeHandler); if (IsPlainObject(typeHandler)) { context.Defragment(new PlainObjectHandler()); } else { context.Defragment(typeHandler); } } finally { context.Seek(savedOffSet); } }
public override void Defragment(IDefragmentContext context) { var payLoadOffSet = context.ReadInt(); if (payLoadOffSet == 0) { return; } var savedOffSet = context.Offset(); context.Seek(payLoadOffSet); var classMetadataId = context.CopyIDReturnOriginalID(); var typeHandler = CorrectTypeHandlerVersionFor(context, classMetadataId ); if (typeHandler != null) { if (IsPlainObject(typeHandler)) { context.CopySlotlessID(); } else { SeekSecondaryOffset(context, typeHandler); context.Defragment(typeHandler); } } context.Seek(savedOffSet); }
public override void Defragment(IDefragmentContext context) { int payLoadOffSet = context.ReadInt(); if (payLoadOffSet == 0) { return; } int savedOffSet = context.Offset(); context.Seek(payLoadOffSet); int classMetadataId = context.CopyIDReturnOriginalID(); ITypeHandler4 typeHandler = CorrectTypeHandlerVersionFor(context, classMetadataId ); if (typeHandler != null) { if (IsPlainObject(typeHandler)) { context.CopySlotlessID(); } else { SeekSecondaryOffset(context, typeHandler); context.Defragment(typeHandler); } } context.Seek(savedOffSet); }
public virtual void Defragment(IDefragmentContext context) { int payLoadOffSet = context.ReadInt(); if (payLoadOffSet == 0) { return; } int savedOffSet = context.Offset(); context.Seek(payLoadOffSet); try { int classMetadataId = context.CopyIDReturnOriginalID(); ITypeHandler4 typeHandler = CorrectTypeHandlerVersionFor(context, classMetadataId ); if (typeHandler == null) { return; } SeekSecondaryOffset(context, typeHandler); if (IsPlainObject(typeHandler)) { context.Defragment(new PlainObjectHandler()); } else { context.Defragment(typeHandler); } } finally { context.Seek(savedOffSet); } }