Example #1
0
        public ExportDefinition()
        {
            Register <ExportDefinitionCreated>(@event =>
            {
                ExportDefinitionId = new ExportDefinitionId(@event.ExportDefinitionId);
                Title         = @event.Title;
                ExportRowList = new List <ExportRow>();
            });

            Register <ExportRowAddedToExportDefinition>(@event =>
            {
                var row = new ExportRow(ApplyChange);
                row.Route(@event);
                ExportRowList.Add(row);
            });
        }
Example #2
0
 public void AddRowToRowsCollection(Guid exportRowId, string name)
 {
     // delgate invariant checks to the object that is interested in this stuff
     ApplyChange(ExportRow.CreateNewRow(exportRowId, name));
 }