@@ -88,7 +88,7 @@ for execution:
8888| void asynchronous command | ` IAsyncCommand ` | ` await IMessageBus.ExecuteAsync(command) ` |
8989| value-returning asynchronous command | ` IAsyncCommand<TResult> ` | ` var result = await IMessageBus.ExecuteAsync(command) ` |
9090
91- The above command can be executed using the following code:
91+ The sample command shown before can be executed using the following code:
9292
9393``` csharp
9494// perhaps a method invoked when a user
@@ -276,14 +276,20 @@ builder.Services.AddMessageBus();
276276
277277All command handlers and event producers need to be registered with the
278278services collection as usual , using the main interface for the component ,
279- such as `ICommandHandler <T >` and `IObservable <TEvent >`.
279+ such as `ICommandHandler <T >` and `IObservable <TEvent >`.
280+
281+ > NOTE : *Merq * makes no assumptions about the lifetime of the registered
282+ > components , so it 's up to the consumer to register them with the desired
283+ > lifetime .
280284
281285To drastically simplify registration of handlers and producers , we
282286recommend the [Devlooped .Extensions .DependencyInjection .Attributed ](https :// www.nuget.org/packages/Devlooped.Extensions.DependencyInjection.Attributed/).
283287package , which provides a simple attribute -based mechanism for automatically
284288emitting at compile -time the required service registrations for all types
285289marked with the provided `[Service ]` attribute , which also allows setting the
286- component lifetime , such as `[Service (ServiceLifetime .Transient )]`.
290+ component lifetime , such as `[Service (ServiceLifetime .Transient )]` (default
291+ lifetime is `ServiceLifetime .Singleton ` for this source generator -based
292+ package ).
287293
288294This allows to simply mark all command handlers and event producers as
289295`[Service ]` and then register them all with a single line of code :
@@ -328,7 +334,7 @@ dotnet counters monitor --process-id [PROCESS_ID] --counters Merq
328334
329335Example rendering from the included sample console app :
330336
331- ! [dotnet - counters screenshot ](https :// github.com/devlooped/Merq/blob/main/assets/img/dotnet-counters.png)
337+ ! [dotnet - counters screenshot ](https :// github.com/devlooped/Merq/blob/main/assets/img/dotnet-counters.png?raw=true )
332338
333339## Duck Typing Support
334340
0 commit comments