// Decompiled with JetBrains decompiler // Type: System.Windows.Forms.FileDataBlock // Assembly: FiestaShark, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null // MVID: 12469781-3753-4869-9C1A-117F1862B52C // Assembly location: E:\Fiesta\Emus\DragonFiesta\Tools\FiestaShark-Farbod\FiestaShark.exe namespace System.Windows.Forms { internal sealed class FileDataBlock : DataBlock { private long _length; private long _fileOffset; public FileDataBlock(long fileOffset, long length) { this._fileOffset = fileOffset; this._length = length; } public long FileOffset { get { return this._fileOffset; } } public override long Length { get { return this._length; } } public void SetFileOffset(long value) { this._fileOffset = value; } public void RemoveBytesFromEnd(long count) { if (count > this._length) throw new ArgumentOutOfRangeException(nameof (count)); this._length -= count; } public void RemoveBytesFromStart(long count) { if (count > this._length) throw new ArgumentOutOfRangeException(nameof (count)); this._fileOffset += count; this._length -= count; } public override void RemoveBytes(long position, long count) { if (position > this._length) throw new ArgumentOutOfRangeException("offset"); if (position + count > this._length) throw new ArgumentOutOfRangeException(nameof (count)); long num = position; long fileOffset1 = this._fileOffset; long length = this._length - count - num; long fileOffset2 = this._fileOffset + position + count; if (num > 0L && length > 0L) { this._fileOffset = fileOffset1; this._length = num; this._map.AddAfter((DataBlock) this, (DataBlock) new FileDataBlock(fileOffset2, length)); } else if (num > 0L) { this._fileOffset = fileOffset1; this._length = num; } else { this._fileOffset = fileOffset2; this._length = length; } } } }