// Token: 0x06000491 RID: 1169 RVA: 0x0001A37C File Offset: 0x0001857C private void Initialize(ExDateTime serviceStartTime, string logFilePath, TimeSpan maxRetentionPeriod, ByteQuantifiedSize directorySizeQuota, ByteQuantifiedSize perFileSizeQuota, bool applyHourPrecision) { int registryInt; using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\MSExchange ADAccess\\Parameters")) { this.enabled = ADProtocolLog.GetRegistryBool(registryKey, "ProtocolLoggingEnabled", true); registryInt = ADProtocolLog.GetRegistryInt(registryKey, "LogBufferSize", 524288); int registryInt2 = ADProtocolLog.GetRegistryInt(registryKey, "FlushIntervalInMinutes", 15); if (registryInt2 > 0) { ADProtocolLog.FlushInterval = TimeSpan.FromMinutes((double)registryInt2); } } if (this.registryWatcher == null) { this.registryWatcher = new RegistryWatcher("SYSTEM\\CurrentControlSet\\Services\\MSExchange ADAccess\\Parameters", false); } if (this.timer == null) { this.timer = new Timer(new TimerCallback(this.UpdateConfigIfChanged), null, 0, 300000); } if (this.enabled) { this.log = new Log(ADProtocolLog.LogFilePrefix, new LogHeaderFormatter(ADProtocolLog.Schema, LogHeaderCsvOption.CsvCompatible), "ADDriverLogs"); this.log.Configure(logFilePath, maxRetentionPeriod, (long)directorySizeQuota.ToBytes(), (long)perFileSizeQuota.ToBytes(), applyHourPrecision, registryInt, ADProtocolLog.FlushInterval, LogFileRollOver.Hourly); AppDomain.CurrentDomain.ProcessExit += this.CurrentDomain_ProcessExit; } this.initialized = true; }
// Token: 0x06000492 RID: 1170 RVA: 0x0001A4A0 File Offset: 0x000186A0 private void UpdateConfigIfChanged(object state) { if (this.registryWatcher.IsChanged()) { using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\MSExchange ADAccess\\Parameters")) { bool registryBool = ADProtocolLog.GetRegistryBool(registryKey, "ProtocolLoggingEnabled", true); if (registryBool != this.enabled) { lock (this.logLock) { this.initialized = false; this.enabled = registryBool; } } } } }