public IMartenQueryable <T> QueryRawEventDataOnly <T>() { _tenant.EnsureStorageExists(typeof(StreamAction)); _store.Events.AddEventType(typeof(T)); return(_session.Query <T>()); }
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>()); }
public void Start(DaemonLifecycle lifecycle) { _logger.StartingProjection(this, lifecycle); _tenant.EnsureStorageExists(_projection.Produces); startConsumers(); Lifecycle = lifecycle; _fetcher.Start(this, lifecycle, _cancellation.Token); }
public void EnsureStorageExists(ITenant tenant) { foreach (var type in Produces) { tenant.EnsureStorageExists(type); } }
private void ensureStorageExists() { if (_projection is IDocumentProjection) { _tenant.EnsureStorageExists(_projection.ProjectedType()); } }
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)); }
public void EnsureStorageExists(Type documentType) { _inner.EnsureStorageExists(documentType); }
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)); }
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); } }
public void EnsureStorageExists(ITenant tenant) { tenant.EnsureStorageExists(Produces); }