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
{(existingComponents.HasFlags(IdTypeComponents.UnsettableValue)?"// To instead get safe syntax, make the Value property '{ get; private init; }' (or let the source generator implement it)":"")}
/// Provides type inference when comparing types that are entirely source-generated. The current code's source generator does not know the appropriate namespace, because the type is being generated at the same time, thus necessitating type inference.
// This method is generated only if the ValueObject implements IComparable<T> against its own type and each data member implements IComparable<T> against its own type
326
+
{(isComparable?"":"/* Generated only if the ValueObject implements IComparable<T> against its own type and each data member implements IComparable<T> against its own type")}
337
327
public int CompareTo({typeName}? other)
338
328
{{
339
329
if (other is null) return +1;
340
330
341
331
{compareToBodyIfInstanceNonNull}
342
332
}}
343
-
344
-
/// <summary>
345
-
/// Provides type inference when comparing types that are entirely source-generated. The current code's source generator does not know the appropriate namespace, because the type is being generated at the same time, thus necessitating type inference.
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
@@ -52,6 +52,7 @@ Correct string comparisons with EF:
52
52
53
53
Performance:
54
54
- Enhancement: Reduced assembly size by having source-generated WrapperValueObject/Identity types use generic JSON serializers instead of generating their own.
55
+
- Enhancement: Reduced assembly size by moving the type-inference Equals() and Compare() helpers on generated ValueObjects into a helper class.
0 commit comments