private void Logger_OnRequestLog(object sender, RequestLogEventArgs e) { _rwLock.AcquireReaderLock(0); foreach (var logTarget in LogTargets) { logTarget.Append(e.Entry); } _rwLock.ReleaseReaderLock(); }
/// <summary> /// 引发 <see cref="RequestLog"/> 事件 /// </summary> protected virtual void OnRequestLog(RequestLogEventArgs e) { RequestLog?.Invoke(this, e); }