コード例 #1
0
 public Stream(string streamId, EventMessage[] committedEvents)
 {
     UncommittedHeaders = new Dictionary<string, object>();
     UncommittedEvents = new List<EventMessage>();
     StreamId = streamId;
     CommittedEvents = committedEvents;
 }
コード例 #2
0
        public ClientAPI.IEvent Serialize(EventMessage source)
        {
            var my = source.Body as IEvent;

            string json = JsonConvert.SerializeObject(source.Body);
            var bytes = Encoding.UTF8.GetBytes(json);
            return new InnerEvent
            {
                EventId = my.Id,
                Type = source.Body.GetType().FullName,
                Data = bytes
            };
        }
コード例 #3
0
 public void Add(EventMessage uncommittedEvent)
 {
     UncommittedEvents.Add(uncommittedEvent);
 }