Beispiel #1
0
        /// <inheritdoc/>
        public IEventEnvelope CreateFrom(IEventSource eventSource, IEvent @event, EventSourceVersion version)
        {
            var envelope = new EventEnvelope(
                TransactionCorrelationId.NotSet,
                Guid.NewGuid(),
                EventSequenceNumber.Zero,
                EventSequenceNumber.Zero,
                _eventMigrationHierarchyManager.GetCurrentGenerationFor(@event.GetType()),
                _applicationResources.Identify(@event),
                eventSource.EventSourceId,
                _applicationResources.Identify(eventSource),
                version,
                _executionContext.Principal.Identity.Name,
                _systemClock.GetCurrentTime()
                );

            return(envelope);
        }