public MultiFileMuxer(ISingleFileMuxerFactory factory) { this.factory = factory; states = new ConcurrentDictionary <FilePath, FileState>(); registrations = new ConcurrentDictionary <MuxerRegistration, MuxerRegistration>(ByReferenceEqualityComparer <MuxerRegistration> .Instance); }
public void TestSetup() { flushBlocker = new TaskCompletionSource <bool>(); singleFileMuxer = Substitute.For <ISingleFileMuxer>(); singleFileMuxer.TryAdd(Arg.Any <LogEventInfo>(), Arg.Any <bool>()).Returns(true); singleFileMuxer.FlushAsync().Returns(flushBlocker.Task); singleMuxerFactory = Substitute.For <ISingleFileMuxerFactory>(); singleMuxerFactory.Create(Arg.Any <FileLogSettings>()).Returns(singleFileMuxer); muxer = new MultiFileMuxer(singleMuxerFactory); }