本文整理匯總了C#中NGit.Transport.PackParser.Next方法的典型用法代碼示例。如果您正苦於以下問題:C# PackParser.Next方法的具體用法?C# PackParser.Next怎麽用?C# PackParser.Next使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NGit.Transport.PackParser
的用法示例。
在下文中一共展示了PackParser.Next方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ResolveDeltas
/// <exception cref="System.IO.IOException"></exception>
private void ResolveDeltas(PackParser.DeltaVisit visit, int type, PackParser.ObjectTypeAndSize
info, ProgressMonitor progress)
{
do
{
progress.Update(1);
info = OpenDatabase(visit.delta, info);
switch (info.type)
{
case Constants.OBJ_OFS_DELTA:
case Constants.OBJ_REF_DELTA:
{
break;
}
default:
{
throw new IOException(MessageFormat.Format(JGitText.Get().unknownObjectType, Sharpen.Extensions.ValueOf
(info.type)));
}
}
byte[] delta = InflateAndReturn(PackParser.Source.DATABASE, info.size);
CheckIfTooLarge(type, BinaryDelta.GetResultSize(delta));
visit.data = BinaryDelta.Apply(visit.parent.data, delta);
delta = null;
if (!CheckCRC(visit.delta.crc))
{
throw new IOException(MessageFormat.Format(JGitText.Get().corruptionDetectedReReadingAt
, Sharpen.Extensions.ValueOf(visit.delta.position)));
}
objectDigest.Update(Constants.EncodedTypeString(type));
objectDigest.Update(unchecked((byte)' '));
objectDigest.Update(Constants.EncodeASCII(visit.data.Length));
objectDigest.Update(unchecked((byte)0));
objectDigest.Update(visit.data);
tempObjectId.FromRaw(objectDigest.Digest(), 0);
VerifySafeObject(tempObjectId, type, visit.data);
PackedObjectInfo oe;
oe = NewInfo(tempObjectId, visit.delta, visit.parent.id);
oe.SetOffset(visit.delta.position);
OnInflatedObjectData(oe, type, visit.data);
AddObjectAndTrack(oe);
visit.id = oe;
visit.nextChild = FirstChildOf(oe);
visit = visit.Next();
}
while (visit != null);
}