本文整理汇总了C#中NGit.AnyObjectId.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# AnyObjectId.CopyTo方法的具体用法?C# AnyObjectId.CopyTo怎么用?C# AnyObjectId.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NGit.AnyObjectId
的用法示例。
在下文中一共展示了AnyObjectId.CopyTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AdvertiseId
/// <summary>Advertise one object under a specific name.</summary>
/// <remarks>
/// Advertise one object under a specific name.
/// <p>
/// If the advertised object is a tag, this method does not advertise the
/// peeled version of it.
/// </remarks>
/// <param name="id">the object to advertise.</param>
/// <param name="refName">
/// name of the reference to advertise the object as, can be any
/// string not including the NUL byte.
/// </param>
/// <exception cref="System.IO.IOException">
/// the underlying output stream failed to write out an
/// advertisement record.
/// </exception>
public virtual void AdvertiseId(AnyObjectId id, string refName)
{
tmpLine.Length = 0;
id.CopyTo(tmpId, tmpLine);
tmpLine.Append(' ');
tmpLine.Append(refName);
if (first)
{
first = false;
if (!capablities.IsEmpty())
{
tmpLine.Append('\0');
foreach (string capName in capablities)
{
tmpLine.Append(' ');
tmpLine.Append(capName);
}
tmpLine.Append(' ');
}
}
tmpLine.Append('\n');
WriteOne(tmpLine);
}