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
> Managing a unit of work via `IManageUnitOfWork` is obsolete as of NServiceBus version 9. Instead, [use a pipeline behavior to manage a unit of work](/samples/pipeline/unit-of-work/).
11
+
> `IManageUnitOfWork` is obsolete as of NServiceBus version 9. [Use a pipeline behavior to manage a unit of work instead.](/samples/pipeline/unit-of-work/)
12
12
13
-
14
-
This sample shows how to create a custom [unit of work](/nservicebus/pipeline/unit-of-work.md).
13
+
This sample demonstrates how to implement a custom [unit of work](/nservicebus/pipeline/unit-of-work.md).
15
14
16
15
include: uow-access-to-context
17
16
18
-
1. Run the solution.
19
-
1. Press <kbd>s</kbd> to send a message that will succeed. Press <kbd>t</kbd> to send a message that will throw.
20
-
17
+
1. Run the solution.
18
+
1. Press <kbd>s</kbd> to send a message that succeeds.
19
+
1. Press <kbd>t</kbd> to send a message that throws an exception.
21
20
22
21
## Code walk-through
23
22
24
-
[Immediate retries](/nservicebus/recoverability/configure-immediate-retries.md) and [delayed retries](/nservicebus/recoverability/configure-delayed-retries.md) have been disabled to reduce the number of errors logged to the console.
25
-
23
+
[Immediate retries](/nservicebus/recoverability/configure-immediate-retries.md) and [delayed retries](/nservicebus/recoverability/configure-delayed-retries.md) are disabled to avoid excessive error logging in the console.
26
24
27
25
### CustomManageUnitOfWork
28
26
29
-
The unit of work logs both the begining and end.
30
-
27
+
Logs both the start and end of the unit of work.
31
28
32
29
snippet: CustomManageUnitOfWork
33
30
34
31
### Component registration
35
32
36
-
snippet: componentRegistration
33
+
Registers the custom unit of work.
37
34
35
+
snippet: componentRegistration
38
36
39
37
### SuccessHandler
40
38
41
-
The `SuccessHandler` logs when a message has been received.
39
+
Logs when a message is successfully received.
42
40
43
41
snippet: SuccessHandler
44
42
45
-
46
43
### ThrowHandler
47
44
48
-
The `ThrowHandler` logs when a message has been received, then throws an exception
45
+
Logs when a message is received, then throws an exception.
0 commit comments