public static SourcedEventEntity FromEventSource(Ncqrs.Eventing.Sourcing.SourcedEvent evnt) { Contract.Requires<ArgumentNullException>(evnt != null, "The evnt cannot be null."); return new SourcedEventEntity { RowKey = evnt.EventIdentifier.ToString(), PartitionKey = evnt.EventSourceId.ToString(), Sequence = evnt.EventSequence }; }
private void AddPropNodeToEvtNode(PropertyInfo prop, Ncqrs.Eventing.Sourcing.ISourcedEvent evt, TreeNode evtNode) { var propNode = new TreeNode { Name = prop.Name, Text = prop.Name + ": " + prop.GetValue(evt, null) }; evtNode.Nodes.Add(propNode); }
private void AddEvtNodeToSourceNode(Ncqrs.Eventing.Sourcing.ISourcedEvent evt, TreeNode sourceNode) { var evtNode = new TreeNode { Name = evt.EventIdentifier.ToString(), Text = evt.GetType().ToString(), Tag = evt }; sourceNode.Nodes.Add(evtNode); foreach (var prop in evt.GetType().GetProperties()) { AddPropNodeToEvtNode(prop, evt, evtNode); } }