public void Setup() { _traceStorage = Substitute.For <ITraceStorage>(); _hub = Substitute.For <IHub>(); _messageHandler = new MessageHandler(_hub, _traceStorage, Substitute.For <ILogger>()); }
public void Add(ITraceStorage storage) { lock (_locker) { _items.Add(storage); _cItems = _items.ToArray(); } }
public void Add(ITraceStorage storage) { lock (_locker) { _items.Add(storage); _isDirty = true; } }
private static async Task InternalWriteAsync(ITraceStorage storage, TraceItem item) { try { await storage.WriteAsync(item).ConfigureAwait(false); } catch { // } }
public MessageHandler( IHub hub, ITraceStorage traceStorage, ILogger logger) { _hub = hub; _traceStorage = traceStorage; _logger = logger; _receivers = new List <Receiver>(); _emitters = new List <Emitter>(); }