GitSharp.Core.Transport.WalkFetchConnection.DownloadPackedObject C# (CSharp) 메소드

DownloadPackedObject() 개인적인 메소드

private DownloadPackedObject ( ProgressMonitor monitor, AnyObjectId id ) : bool
monitor ProgressMonitor
id AnyObjectId
리턴 bool
        private bool DownloadPackedObject(ProgressMonitor monitor, AnyObjectId id)
        {
            IEnumerator<RemotePack> packItr = _unfetchedPacks.GetEnumerator();
            while (packItr.MoveNext() && !monitor.IsCancelled)
            {
                RemotePack pack = packItr.Current;
                try
                {
                    pack.OpenIndex(monitor);
                }
                catch (IOException err)
                {
                    RecordError(id, err);
                    _unfetchedPacks.Remove(pack);
                    continue;
                }

                if (monitor.IsCancelled)
                    return false;

                if (!pack.Index.HasObject(id))
                    continue;

                try
                {
                    pack.DownloadPack(monitor);
                }
                catch (IOException err)
                {
                    RecordError(id, err);
                    continue;
                }
                finally
                {
                    pack.TmpIdx.Delete();
                    _unfetchedPacks.Remove(pack);
                }

                if (!_local.HasObject(id))
                {
                    RecordError(id,
                                new FileNotFoundException("Object " + id.Name + " not found in " + pack.PackName + "."));
                    continue;
                }

                IEnumerator<ObjectId> pending = SwapFetchQueue();
                while (pending.MoveNext())
                {
                    ObjectId p = pending.Current;
                    if (pack.Index.HasObject(p))
                    {
                        _workQueue.Remove(p);
                        Process(p);
                    }
                    else
                        _workQueue.AddLast(p);
                }
                return true;
            }
            return false;
        }