You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DomainModeling/DomainModeling.csproj
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ Misc:
65
65
- Semi-breaking: IFormattable & co for string wrappers have stopped treating null strings as "", as this could cover up mistakes instead of revealing them.
66
66
- Semi-breaking: IIdentity now implements IWrapperValueObject.
- Feature: DummyBuilder records clone themselves on each step, for reuse.
68
69
- Feature: Analyzer warns when '==' or similar operator implicitly casts some IValueObject to something else. This avoids accidentally comparing unrelated types.
69
70
- Fix: Fixed bug where source-generated records would always generate ToString()/Equals()/GetHashCode(), even if you wrote your own.
70
71
- Fix: Fixed bug where source-generated Wrappers/Identities would not recognize manual member implementations if they were explicit interface implementations.
@@ -278,7 +278,7 @@ Change the type as follows to get source generation for it:
278
278
279
279
```cs
280
280
[DummyBuilder<Payment>]
281
-
publicpartialclassPaymentDummyBuilder
281
+
publicpartialrecordclassPaymentDummyBuilder
282
282
{
283
283
// Anything defined manually will cause the source generator to outcomment its conflicting code, i.e. manual code always takes precedence
284
284
@@ -294,6 +294,8 @@ The generated `Build()` method opts for _the most visible, simplest parameterize
294
294
295
295
Dummy builders generally live in a test project, or in a library project consumed solely by test projects.
296
296
297
+
Note that, if the dummy builder is a record class, a new copy is made on every mutation. This allows a partially constructed builder to be reused in multiple directions.
298
+
297
299
## Constructor Validation
298
300
299
301
DDD promotes the validation of domain rules and invariants in the constructors of the domain objects. This pattern is fully supported:
0 commit comments