diff --git a/docs/guide/handlers/discovery.md b/docs/guide/handlers/discovery.md
index e50f9a355..cb4ed34ed 100644
--- a/docs/guide/handlers/discovery.md
+++ b/docs/guide/handlers/discovery.md
@@ -223,7 +223,7 @@ using var host = await Host.CreateDefaultBuilder()
opts.DisableConventionalDiscovery();
}).StartAsync();
```
-snippet source | anchor
+snippet source | anchor
## Explicitly Ignoring Methods
diff --git a/docs/guide/handlers/index.md b/docs/guide/handlers/index.md
index b487700c4..1ae35ca5e 100644
--- a/docs/guide/handlers/index.md
+++ b/docs/guide/handlers/index.md
@@ -26,7 +26,7 @@ public class MyMessageHandler
}
}
```
-snippet source | anchor
+snippet source | anchor
If you've used other messaging, command execution, or so-called "mediator" tools in .NET, you'll surely notice the absence of any kind of
@@ -44,7 +44,7 @@ public static async Task publish_command(IMessageBus bus)
await bus.PublishAsync(new MyMessage());
}
```
-snippet source | anchor
+snippet source | anchor
Between the call to `IMessageBus.PublishAsync()` and `MyMessageHandler.Handle(MyMessage)` there's a couple things
@@ -116,7 +116,21 @@ public class ValidMessageHandlers
It's also valid to use class instances with constructor arguments for your handlers:
-snippet: sample_instance_handler
+
+
+```cs
+// Wolverine does constructor injection as you're probably
+// used to with basically every other framework in .NET
+public class CreateProjectHandler(IProjectRepository Repository)
+{
+ public async Task HandleAsync(CreateProject message)
+ {
+ await Repository.CreateAsync(new Project(message.Name));
+ }
+}
+```
+snippet source | anchor
+
## Rules for Message Handlers
@@ -183,7 +197,7 @@ public class ExampleHandler
}
}
```
-snippet source | anchor
+snippet source | anchor
When using instance methods, the containing handler type will be scoped to a single message and be
@@ -211,7 +225,7 @@ public class ServiceUsingHandler
}
}
```
-snippet source | anchor
+snippet source | anchor
::: tip
@@ -238,7 +252,7 @@ public static class ExampleHandler
}
}
```
-snippet source | anchor
+snippet source | anchor
The handler classes can be static classes as well. This technique gets much more useful when combined with Wolverine's
@@ -266,7 +280,7 @@ public static class MethodInjectionHandler
}
}
```
-snippet source | anchor
+snippet source | anchor
So, what can be injected as an argument to your message handler?
@@ -377,7 +391,7 @@ public class EnvelopeUsingHandler
}
}
```
-snippet source | anchor
+snippet source | anchor
diff --git a/docs/guide/handlers/multi-tenancy.md b/docs/guide/handlers/multi-tenancy.md
index 2d5578920..43bb00c27 100644
--- a/docs/guide/handlers/multi-tenancy.md
+++ b/docs/guide/handlers/multi-tenancy.md
@@ -37,3 +37,30 @@ public static async Task publish_by_tenant(IMessageBus bus)
```
snippet source | anchor
+
+## Cascading Messages
+
+As a convenience, you can embed tenant id information into outgoing cascading messages with these helpers:
+
+
+
+```cs
+public static IEnumerable