Exemple #1
0
        // Token: 0x0600138D RID: 5005 RVA: 0x0007206C File Offset: 0x0007026C
        private void AddTempFileReaderToSortedList(TempFileReader tempFileReader)
        {
            bool flag;

            do
            {
                flag = true;
                TempFileReader.TempFileRecord tempFileRecord = null;
                if (!tempFileReader.NoMoreRecords)
                {
                    tempFileRecord = tempFileReader.PeekNextRecord();
                }
                if (tempFileRecord != null)
                {
                    if (!this.topRecords.ContainsKey(tempFileRecord.ObjectGuid))
                    {
                        this.topRecords.Add(tempFileRecord.ObjectGuid, tempFileReader);
                    }
                    else
                    {
                        flag = false;
                        TempFileReader.TempFileRecord tempFileRecord2 = tempFileReader.ReadNextRecord();
                        ExTraceGlobals.AssistantTracer.TraceError <string, Guid>((long)this.GetHashCode(), "TempFileReader({0}) contained a record with ObjectGuid {1} which already exists in the SortedDictionary<> topRecords.  This record is being discarded.", tempFileReader.FileName, tempFileRecord2.ObjectGuid);
                    }
                }
                else
                {
                    ExTraceGlobals.AssistantTracer.TraceDebug <string>((long)this.GetHashCode(), "TempFileReader({0}) has no more entries; disposing it", tempFileReader.FileName);
                    tempFileReader.Dispose();
                }
            }while (!flag);
        }
Exemple #2
0
 // Token: 0x0600138B RID: 5003 RVA: 0x00071F34 File Offset: 0x00070134
 public void Initialize(GenerationStats stats, List <FileStream> tempFiles)
 {
     ExTraceGlobals.AssistantTracer.TraceFunction((long)this.GetHashCode(), "TempFileReaderCollection.Initialize start");
     foreach (FileStream fileStream in tempFiles)
     {
         fileStream.Seek(0L, SeekOrigin.Begin);
         TempFileReader tempFileReader = new TempFileReader(stats, fileStream);
         ExTraceGlobals.AssistantTracer.TraceDebug <string>((long)this.GetHashCode(), "Adding TempFileReader({0}) to collection", tempFileReader.FileName);
         this.AddTempFileReaderToSortedList(tempFileReader);
     }
     ExTraceGlobals.AssistantTracer.TraceFunction((long)this.GetHashCode(), "TempFileReaderCollection.Initialize end");
 }