Closed hallgren closed 2 years ago
Makes the event registration simpler.
s.RegisterTypes(&SomeAggregate{}, func() interface{} { return &SomeData{} }, func() interface{} { return &SomeData2{} })
s.Register(&SomeAggregate{}, s.Events(&SomeData{}, &SomeData2{}))
The "old" method RegisterTypes will still be present to keep backwards compatibility.
Makes the event registration simpler.
From:
s.RegisterTypes(&SomeAggregate{}, func() interface{} { return &SomeData{} }, func() interface{} { return &SomeData2{} })
To:
s.Register(&SomeAggregate{}, s.Events(&SomeData{}, &SomeData2{}))
The "old" method RegisterTypes will still be present to keep backwards compatibility.