System.Collections.Concurrent.ConcurrentBag.Add(Serilog.Events.LogEvent)

Here are the examples of the csharp api class System.Collections.Concurrent.ConcurrentBag.Add(Serilog.Events.LogEvent) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: serilog-sinks-async
Source File: MemorySink.cs
public void Emit(LogEvent logEvent)
        {
            if (DelayEmit.HasValue)
                Task.Delay(DelayEmit.Value).Wait();

            Events.Add(logEvent);

            if (ThrowAfterCollecting)
                throw new Exception($"Exception requested through {nameof(ThrowAfterCollecting)}.");
        }