Skip to content

Commit 936741e

Browse files
authored
Legacy doc review
1 parent 2af8ddb commit 936741e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: Conventions
3-
summary: Custom conventions for defining how certain things are detected
3+
summary: Custom conventions for defining how certain things are detected and to support unobtrusive mode
44
component: Core
5-
reviewed: 2021-10-04
5+
reviewed: 2024-08-22
66
related:
77
- nservicebus/messaging/messages-events-commands
88
- nservicebus/messaging/unobtrusive-mode
99
---
1010

11-
A *convention* is a way of defining what a certain type is instead of using an interface or an attribute. Using conventions along with avoiding references to NServiceBus assemblies is referred to as *[unobtrusive mode](unobtrusive-mode.md)*. This is ideal for use in cross-platform environments.
11+
*Conventions* can be used to identify which types are messages, commands, and events, instead of using [marker interfaces](/nservicebus/messaging/messages-events-commands#identifying-messages-marker-interfaces). This can be done to avoid references to the NServiceBus assembly, referred to as *[unobtrusive mode](unobtrusive-mode.md)*. This is ideal for use in cross-platform environments.
1212

13-
Currently conventions exist to identify:
13+
Currently *conventions* exist to identify:
1414

1515
* [Commands](/nservicebus/messaging/messages-events-commands.md)
1616
* [Events](/nservicebus/messaging/messages-events-commands.md)
@@ -19,21 +19,21 @@ Currently conventions exist to identify:
1919
* [Data Bus](/nservicebus/messaging/databus/)
2020
* [TimeToBeReceived](/nservicebus/messaging/discard-old-messages.md)
2121

22-
Messages can be defined in a *Portable Class Library* (PCL) and shared across multiple platforms even if the platform does not use NServiceBus for message processing.
22+
Message types can be defined in a *Portable Class Library* (PCL) and shared across multiple platforms, even if the platform does not use NServiceBus for message processing.
2323

2424
snippet: MessageConventions
2525

2626
> [!NOTE]
27-
> Note that in .NET, the namespace is optional and hence can be null. If any conventions do partial string checks, for example using `EndsWith` or `StartsWith`, then a null check should be used. So include `.Namespace != null` at the start of the convention. Otherwise a null reference exception will occur during the type scanning.
27+
> In .NET, the namespace is optional and can be null. If any conventions do partial string checks, for example using `EndsWith` or `StartsWith`, then a null check should be used. Include `.Namespace != null` at the start of the convention to avoid a null reference exception during type scanning.
2828
2929
## Using both default and custom conventions
3030

31-
Defining conventions will replace any of the existing conventions. If both default and custom conventions are needed it is required to embed the NServiceBus marker interfaces/types into the new custom conventions.
31+
Defining a custom convention will overwrite the default convention. If both default and custom conventions are needed, the default conventions must be specified along with the custom conventions.
3232

3333
snippet: MessageConventionsDual
3434

3535
partial: encapsulated-conventions
3636

3737
## Attributes
3838

39-
If attributes are preferred over marker interfaces then this can be achieved via [NServiceBus.AttributeConventions](https://github.com/mauroservienti/NServiceBus.AttributeConventions), a [community package](/nservicebus/community/) that allows using attributes instead of interfaces.
39+
If attributes are preferred over marker interfaces then this can be achieved using [NServiceBus.AttributeConventions](https://github.com/mauroservienti/NServiceBus.AttributeConventions), a [community package](/nservicebus/community/) that allows using attributes instead of interfaces.

0 commit comments

Comments
 (0)