Skip to content

Commit

Permalink
martinothamar#10 - Proof of Work - Update MediatorFallback.sbn-cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hau-Hau committed Sep 25, 2022
1 parent c9249fa commit 3972f2b
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,23 @@ namespace {{ MediatorNamespace }}
/// Mediator module for Jab.
/// </summary>
[ServiceProviderModule]
{{~ if ServiceLifetimeIsScoped ~}}
[global::Jab.{{ ServiceLifetime }}(typeof(global::{{ MediatorNamespace }}.Mediator), typeof(global::{{ MediatorNamespace }}.Mediator))]
[global::Jab.{{ ServiceLifetime }}(typeof(global::Mediator.IMediator), typeof(global::{{ MediatorNamespace }}.Mediator))]
[global::Jab.{{ ServiceLifetime }}(typeof(global::Mediator.ISender), typeof(global::{{ MediatorNamespace }}.Mediator))]
[global::Jab.{{ ServiceLifetime }}(typeof(global::Mediator.IPublisher), typeof(global::{{ MediatorNamespace }}.Mediator))]
{{ else }}
[global::Jab.{{ SingletonServiceLifetime }}(typeof(global::{{ MediatorNamespace }}.Mediator), typeof(global::{{ MediatorNamespace }}.Mediator))]
[global::Jab.{{ SingletonServiceLifetime }}(typeof(global::Mediator.IMediator), typeof(global::{{ MediatorNamespace }}.Mediator))]
[global::Jab.{{ SingletonServiceLifetime }}(typeof(global::Mediator.ISender), typeof(global::{{ MediatorNamespace }}.Mediator))]
[global::Jab.{{ SingletonServiceLifetime }}(typeof(global::Mediator.IPublisher), typeof(global::{{ MediatorNamespace }}.Mediator))]
{{~ end ~}}

{{~ for message in RequestMessages ~}}
[global::Mediator.{{ message.Handler.ServiceLifetime }}(typeof({{ message.HandlerWrapperTypeNameWithGenericTypeArguments }}))]
[global::Jab.{{ message.Handler.ServiceLifetime }}(typeof({{ message.HandlerWrapperIRequestHandler }}, typeof({{ message.Handler.FullName }}))]
[global::Jab.{{ message.Handler.ServiceLifetime }}(typeof({{ message.HandlerWrapperTypeNameWithGenericTypeArguments }}))]
{{~ end ~}}

{{~ for handler in NotificationMessageHandlers ~}}
{{ handler.ServiceRegistrationBlock }}
{{~ end ~}}
Expand All @@ -38,7 +52,7 @@ namespace {{ MediatorNamespace }}
{{~ for handler in OpenGenericNotificationMessageHandlers ~}}
{{ handler.OpenGenericServiceRegistrationBlock }}
{{~ end ~}}
[Jab.Singleton(typeof(global::Microsoft.Extensions.DependencyInjection.MediatorDependencyInjectionExtensions.Dummy))]
[global::Jab.Singleton(typeof(global::Microsoft.Extensions.DependencyInjection.MediatorDependencyInjectionExtensions.Dummy))]
[global::System.CodeDom.Compiler.GeneratedCode("Mediator.SourceGenerator", "{{ GeneratorVersion }}")]
public interface IMediatorModule
{
Expand Down

0 comments on commit 3972f2b

Please sign in to comment.