protected virtual void OnLogLoaded(LogLoadedCancelEventArgs e) { if (LogLoaded != null) { LogLoaded(this, e); } }
private void StartRead() { this.trigger.WaitOne(); this.InitializeLoading(); using (StreamReader reader = new StreamReader(loggerDir)) { String line = String.Empty; while ((line = reader.ReadLine()) != null) { if (String.IsNullOrWhiteSpace(line)) { continue; } Log log = Log.Parse(line); LogLoadedCancelEventArgs lac = new LogLoadedCancelEventArgs(log); this.OnLogLoaded(lac); this.cancel = lac.Cancel; if (cancel) { return; } } } this.FinalizeLoading(); }