Beispiel #1
0
 private FileMessage(
     IProducerMessage payload,
     ModelType modelType,
     string topicKey,
     ulong uniqueId
     )
 {
     Payload   = payload;
     ModelType = modelType;
     TopicKey  = topicKey;
     UniqueId  = uniqueId;
 }
Beispiel #2
0
 public static FileMessage New(
     IProducerMessage payload,
     ModelType modelType,
     string topicKey,
     ulong uniqueId
     )
 {
     return(new FileMessage(
                payload,
                modelType,
                topicKey,
                uniqueId
                ));
 }
        public IEvent <TKey, TAggregate> ToEvent <TKey, TAggregate>(IEventId eventId, IProducerMessage eventMessage) where TAggregate : IAggregate <TKey>
        {
            var @event = (IEvent <TKey, TAggregate>)Serializer.Deserialize(eventMessage.MessageBytes, eventMessage.MessageType);

            @event.Version = eventId.Version;
            return(@event);
        }
Beispiel #4
0
 public ProducerMessagerController(IProducerMessage producerMessage)
 {
     _producerMessage = producerMessage;
 }