/// <summary> /// Overwrites the existing box in the file after updating /// the table for a size change. /// </summary> /// <param name="file"> /// A <see cref="File" /> object containing the file to which /// the current instance belongs and wo which modifications /// must be applied. /// </param> /// <param name="sizeDifference"> /// A <see cref="long" /> value containing the size /// change that occurred in the file. /// </param> /// <param name="after"> /// A <see cref="long" /> value containing the position in /// the file after which offsets will be invalidated. If an /// offset is before this point, it won't be updated. /// </param> /// <exception cref="ArgumentNullException"> /// <param name="file" /> is <see langref="null" />. /// </exception> public void Overwrite(File file, long sizeDifference, long after) { if (file == null) { throw new ArgumentNullException("file"); } file.Insert(Render(sizeDifference, after), Header.Position, Size); }
/// <summary> /// Overwrites the existing box in the file after updating /// the table for a size change. /// </summary> /// <param name="file"> /// A <see cref="File" /> object containing the file to which /// the current instance belongs and wo which modifications /// must be applied. /// </param> /// <param name="sizeDifference"> /// A <see cref="long" /> value containing the size /// change that occurred in the file. /// </param> /// <param name="after"> /// A <see cref="long" /> value containing the position in /// the file after which offsets will be invalidated. If an /// offset is before this point, it won't be updated. /// </param> /// <exception cref="ArgumentNullException"> /// <param name="file" /> is <see langref="null" />. /// </exception> public void Overwrite (File file, long sizeDifference, long after) { if (file == null) throw new ArgumentNullException ("file"); file.Insert (Render (sizeDifference, after), Header.Position, Size); }