public InMemoryStreamStore(GetUtcNow getUtcNow = null, string logName = null)
     : base(TimeSpan.FromMinutes(1), 10000, getUtcNow, logName ?? nameof(InMemoryStreamStore))
 {
     _getUtcNow = getUtcNow ?? SystemClock.GetUtcNow;
     _allStream.AddFirst(new InMemoryStreamMessage(
                             "<in-memory-root-message>",
                             Guid.NewGuid(),
                             -1,
                             -1,
                             _getUtcNow(),
                             null,
                             null,
                             null));
     _onStreamAppended = () =>
     {
         if (_signallingToSubscribers.CompareExchange(true, false) == false)
         {
             Task.Run(() =>
             {
                 _subscriptions.OnNext(Unit.Default);
                 _signallingToSubscribers.Set(false);
             });
         }
     };
 }
        public InMemoryStreamStore(GetUtcNow getUtcNow = null, string logName = null)
            : base(TimeSpan.FromMinutes(1), 10000, getUtcNow, logName ?? nameof(InMemoryStreamStore))
        {
            _getUtcNow = getUtcNow ?? SystemClock.GetUtcNow;
            _allStream.AddFirst(new InMemoryStreamMessage(
                                    "<in-memory-root-message>",
                                    Guid.NewGuid(),
                                    -1,
                                    -1,
                                    _getUtcNow(),
                                    null,
                                    null,
                                    null));

            _onStreamAppended = () => _subscriptions.OnNext(Unit.Default);
        }
        public InMemoryEventStore(GetUtcNow getUtcNow = null, string logName = null)
            : base(logName ?? nameof(InMemoryEventStore))
        {
            _getUtcNow = getUtcNow ?? SystemClock.GetUtcNow;
            _allStream.AddFirst(new InMemoryStreamEvent(
                                    "<in-memory-root-event>",
                                    Guid.NewGuid(),
                                    -1,
                                    -1,
                                    _getUtcNow(),
                                    null,
                                    null,
                                    null));

            _onStreamAppended = () => _subscriptions.OnNext(Unit.Default);
        }