Ejemplo n.º 1
0
        public IMartenQueryable <T> QueryRawEventDataOnly <T>()
        {
            _tenant.EnsureStorageExists(typeof(StreamAction));

            _store.Events.AddEventType(typeof(T));

            return(_session.Query <T>());
        }
Ejemplo n.º 2
0
        public IMartenQueryable <T> QueryRawEventDataOnly <T>()
        {
            _tenant.EnsureStorageExists(typeof(StreamAction));

            if (_store.Events.AllAggregates().Any(x => x.AggregateType == typeof(T)))
            {
                return(_session.Query <T>());
            }

            _store.Events.AddEventType(typeof(T));

            return(_session.Query <T>());
        }
Ejemplo n.º 3
0
        public void Start(DaemonLifecycle lifecycle)
        {
            _logger.StartingProjection(this, lifecycle);

            _tenant.EnsureStorageExists(_projection.Produces);

            startConsumers();

            Lifecycle = lifecycle;
            _fetcher.Start(this, lifecycle, _cancellation.Token);


        }
Ejemplo n.º 4
0
 public void EnsureStorageExists(ITenant tenant)
 {
     foreach (var type in Produces)
     {
         tenant.EnsureStorageExists(type);
     }
 }
Ejemplo n.º 5
0
 private void ensureStorageExists()
 {
     if (_projection is IDocumentProjection)
     {
         _tenant.EnsureStorageExists(_projection.ProjectedType());
     }
 }
Ejemplo n.º 6
0
        public void StartAll()
        {
            Logger.BeginStartAll(_tracks.Values);

            foreach (var track in _tracks.Values)
            {
                _tenant.EnsureStorageExists(track.ViewType);
            }

            _tenant.EnsureStorageExists(typeof(EventStream));

            findCurrentEventLogPositions();

            foreach (var track in _tracks.Values)
            {
                track.Start(DaemonLifecycle.Continuous);
            }

            Logger.FinishedStartingAll();
        }
 public void EnsureStorageExists(ITenant tenant)
 {
     tenant.EnsureStorageExists(typeof(QuestPatchTestProjection));
 }
Ejemplo n.º 8
0
 public void EnsureStorageExists(Type documentType)
 {
     _inner.EnsureStorageExists(documentType);
 }
Ejemplo n.º 9
0
 private void ensureAsStringStorage()
 {
     if (StreamIdentity == StreamIdentity.AsGuid)
     {
         throw new InvalidOperationException("This Marten event store is configured to identify streams with Guids");
     }
     _tenant.EnsureStorageExists(typeof(EventStream));
 }
Ejemplo n.º 10
0
        public void Append(Guid stream, params object[] events)
        {
            _tenant.EnsureStorageExists(typeof(EventStream));

            if (_unitOfWork.HasStream(stream))
            {
                _unitOfWork.StreamFor(stream).AddEvents(events.Select(EventStream.ToEvent));
            }
            else
            {
                var eventStream = new EventStream(stream, events.Select(EventStream.ToEvent).ToArray(), false);

                _unitOfWork.StoreStream(eventStream);
            }
        }
Ejemplo n.º 11
0
 public void EnsureStorageExists(ITenant tenant)
 {
     tenant.EnsureStorageExists(Produces);
 }