Esempio n. 1
0
        public void Setup()
        {
            _traceStorage = Substitute.For <ITraceStorage>();
            _hub          = Substitute.For <IHub>();

            _messageHandler = new MessageHandler(_hub, _traceStorage, Substitute.For <ILogger>());
        }
Esempio n. 2
0
 public void Add(ITraceStorage storage)
 {
     lock (_locker)
     {
         _items.Add(storage);
         _cItems = _items.ToArray();
     }
 }
Esempio n. 3
0
 public void Add(ITraceStorage storage)
 {
     lock (_locker)
     {
         _items.Add(storage);
         _isDirty = true;
     }
 }
Esempio n. 4
0
 private static async Task InternalWriteAsync(ITraceStorage storage, TraceItem item)
 {
     try
     {
         await storage.WriteAsync(item).ConfigureAwait(false);
     }
     catch
     {
         //
     }
 }
Esempio n. 5
0
        public MessageHandler(
            IHub hub,
            ITraceStorage traceStorage,
            ILogger logger)
        {
            _hub          = hub;
            _traceStorage = traceStorage;
            _logger       = logger;

            _receivers = new List <Receiver>();
            _emitters  = new List <Emitter>();
        }