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: nservicebus/messaging/immutable-messages.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Immutable Messages
3
-
reviewed: 2024-08-13
3
+
reviewed: 2025-02-19
4
4
component: Core
5
5
related:
6
6
- samples/immutable-messages
@@ -13,8 +13,19 @@ Usually messages are designed as [DTOs](https://en.wikipedia.org/wiki/Data_trans
13
13
14
14
Message objects can be made immutable at runtime by:
15
15
16
-
1. Creating properties with only public getters and initializing these properties via constructor initialization.
17
-
2. Having regular message classes with public getters/setters at the sender, where these classes implement an interface with only public getters. Receivers reference only the interface.
16
+
1. Using record types
17
+
2. Creating properties with only public getters and initializing these properties via constructor initialization.
18
+
3. Having regular message classes with public getters/setters at the sender, where these classes implement an interface with only public getters. Receivers reference only the interface.
0 commit comments