本文整理汇总了C#中TagLib.Insert方法的典型用法代码示例。如果您正苦于以下问题:C# TagLib.Insert方法的具体用法?C# TagLib.Insert怎么用?C# TagLib.Insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TagLib
的用法示例。
在下文中一共展示了TagLib.Insert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Overwrite
public void Overwrite(TagLib.Mpeg4.File file, long sizeDifference, long after)
{
if (file == null)
{
throw new ArgumentNullException("file");
}
file.Insert(this.Render(sizeDifference, after), base.Header.Position, (long) this.Size);
}
示例2: Overwrite
/// <summary>
/// Overwrites the header on disk, updating it to include a
/// change in the size of the box.
/// </summary>
/// <param name="file">
/// A <see cref="TagLib.File" /> object containing the file
/// from which the box originates.
/// </param>
/// <param name="sizeChange">
/// A <see cref="long" /> value indicating the change in the
/// size of the box described by the current instance.
/// </param>
/// <returns>
/// The size change encountered by the box that parents the
/// box described the the current instance, equal to the
/// size change of the box plus any size change that should
/// happen in the header.
/// </returns>
public long Overwrite (TagLib.File file, long sizeChange)
{
if (file == null)
throw new ArgumentNullException ("file");
if (!from_disk)
throw new InvalidOperationException (
"Cannot overwrite headers not on disk.");
long old_header_size = HeaderSize;
DataSize += sizeChange;
file.Insert (Render (), position, old_header_size);
return sizeChange + HeaderSize - old_header_size;
}
示例3: Overwrite
public long Overwrite(TagLib.File file, long sizeChange)
{
if (file == null)
{
throw new ArgumentNullException("file");
}
if (!this.from_disk)
{
throw new InvalidOperationException("Cannot overwrite headers not on disk.");
}
long headerSize = this.HeaderSize;
this.DataSize += sizeChange;
file.Insert(this.Render(), this.position, headerSize);
return ((sizeChange + this.HeaderSize) - headerSize);
}