Пример #1
0
 // Token: 0x06001382 RID: 4994 RVA: 0x00071C7C File Offset: 0x0006FE7C
 public TempFileReader(GenerationStats stats, FileStream tempFileStream)
 {
     this.stats          = stats;
     this.tempFileStream = tempFileStream;
     this.ioCostStream   = new IOCostStream(new NoCloseStream(this.tempFileStream));
     this.fileSystemPerformanceTracker = new FileSystemPerformanceTracker("ProduceSortedFlatFile", this.ioCostStream, this.stats);
     this.binaryReader = new BinaryReader(this.ioCostStream);
     this.records      = new Queue <TempFileReader.TempFileRecord>(Globals.TempFileRecordBatchSize);
 }
Пример #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");
 }
Пример #3
0
        // Token: 0x060012EB RID: 4843 RVA: 0x0006E0C4 File Offset: 0x0006C2C4
        public void Compress(FileSet fileSet, GenerationStats stats, string marker)
        {
            this.compressedFileStream = fileSet.Create("LZX");
            long  length = this.uncompressedFileStream.Length;
            ulong num    = (ulong)-1;

            this.uncompressedFileSize = (uint)this.uncompressedFileStream.Length;
            this.uncompressedFileStream.Seek(0L, SeekOrigin.Begin);
            Stopwatch stopwatch = Stopwatch.StartNew();

            byte[] array = new byte[Globals.MaxCompressionBlockSize];
            using (IOCostStream iocostStream = new IOCostStream(new NoCloseStream(this.uncompressedFileStream)))
            {
                using (new FileSystemPerformanceTracker(marker, iocostStream, stats))
                {
                    using (IOCostStream iocostStream2 = new IOCostStream(new OABCompressStream(this.compressedFileStream, Globals.MaxCompressionBlockSize)))
                    {
                        using (new FileSystemPerformanceTracker(marker, iocostStream2, stats))
                        {
                            for (;;)
                            {
                                int num2 = iocostStream.Read(array, 0, array.Length);
                                if (num2 == 0)
                                {
                                    break;
                                }
                                iocostStream2.Write(array, 0, num2);
                            }
                        }
                    }
                }
            }
            stopwatch.Stop();
            this.ioDuration        += stopwatch.Elapsed;
            this.compressedFileSize = (uint)this.compressedFileStream.Length;
            this.compressedFileHash = OABFileHash.GetHash(this.compressedFileStream);
        }
 // Token: 0x060012BA RID: 4794 RVA: 0x0006D0EF File Offset: 0x0006B2EF
 public DiffFileGenerator(OABFile oldFile, OABFile newFile, GenerationStats stats) : this(oldFile, newFile, delegate()
 {
 }, stats)
 {
 }
 // Token: 0x060012B9 RID: 4793 RVA: 0x0006D0C8 File Offset: 0x0006B2C8
 public DiffFileGenerator(OABFile oldFile, OABFile newFile, Action abortProcessingOnShutdown, GenerationStats stats)
 {
     this.oldFile = oldFile;
     this.newFile = newFile;
     this.stats   = stats;
     this.abortProcessingOnShutdown = abortProcessingOnShutdown;
 }
Пример #6
0
 // Token: 0x06001335 RID: 4917 RVA: 0x0006F7C4 File Offset: 0x0006D9C4
 public AddressListFileGenerator(ADObjectId addressList, OABFile addressListFile, PropertyManager propertyManager, FileSet fileSet, GenerationStats stats, Action abortProcessingOnShutdown)
 {
     this.addressListFile           = addressListFile;
     this.propertyManager           = propertyManager;
     this.fileSet                   = fileSet;
     this.stats                     = stats;
     this.abortProcessingOnShutdown = abortProcessingOnShutdown;
     this.adAddressListEnumerator   = ADAddressListEnumerator.Create(addressList, this.stats.OfflineAddressBook.OrganizationId, this.propertyManager.PropertyDefinitions, Globals.ADQueryPageSize, this.stats);
     this.firstPage                 = true;
     this.tempFiles                 = new List <FileStream>();
 }
 // Token: 0x0600131E RID: 4894 RVA: 0x0006E8A9 File Offset: 0x0006CAA9
 public TemplateFileGenerator(IConfigurationSession adSystemConfigSession, ADRawEntry addressTemplateContainer, OABDataFileType oabDataFileType, GenerationStats stats)
 {
     this.adSystemConfigSession    = adSystemConfigSession;
     this.addressTemplateContainer = addressTemplateContainer;
     this.oabDataFileType          = oabDataFileType;
     this.stats = stats;
 }
        // Token: 0x0600123B RID: 4667 RVA: 0x00068564 File Offset: 0x00066764
        public static ADAddressListEnumerator Create(ADObjectId addressList, OrganizationId organizationId, IEnumerable <ADPropertyDefinition> properties, int pageSize, GenerationStats stats)
        {
            IRecipientSession tenantOrRootOrgRecipientSession = DirectorySessionFactory.Default.GetTenantOrRootOrgRecipientSession(true, ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromOrganizationIdWithAddressListScopeServiceOnly(organizationId, addressList), 48, "Create", "f:\\15.00.1497\\sources\\dev\\MailboxAssistants\\src\\assistants\\OABGenerator\\ADAddressListEnumerator.cs");
            QueryFilter       filter = new ComparisonFilter(ComparisonOperator.Equal, ADRecipientSchema.AddressListMembership, addressList);

            return(new ADAddressListEnumerator(tenantOrRootOrgRecipientSession, null, QueryScope.SubTree, filter, null, pageSize, properties, tenantOrRootOrgRecipientSession.SessionSettings.SkipCheckVirtualIndex)
            {
                session = tenantOrRootOrgRecipientSession,
                stats = stats
            });
        }