diff --git a/src/Immediate.Handlers.Generators/Templates/Handler.sbntxt b/src/Immediate.Handlers.Generators/Templates/Handler.sbntxt index a947d737..0677e9b1 100644 --- a/src/Immediate.Handlers.Generators/Templates/Handler.sbntxt +++ b/src/Immediate.Handlers.Generators/Templates/Handler.sbntxt @@ -12,26 +12,26 @@ partial class {{ class_name }} { public sealed class Handler : global::Immediate.Handlers.Shared.IHandler<{{ request_type }}, {{ response_type }}> { - private readonly {{ class_fully_qualified_name }}.HandleBehavior _HandleBehavior; + private readonly {{ class_fully_qualified_name }}.HandleBehavior _handleBehavior; {{~ for behavior in (behaviors | array.reverse) ~}} private readonly {{ behavior.non_generic_type_name }}<{{ request_type }}, {{ response_type }}> _{{ behavior.variable_name }}; {{~ end ~}} public Handler( - {{ class_fully_qualified_name }}.HandleBehavior HandleBehavior{{ if behaviors.size > 0 }},{{ end }} + {{ class_fully_qualified_name }}.HandleBehavior handleBehavior{{ if behaviors.size > 0 }},{{ end }} {{~ for behavior in (behaviors | array.reverse) ~}} {{ behavior.non_generic_type_name }}<{{ request_type }}, {{ response_type }}> {{ behavior.variable_name }}{{ if !for.last }},{{end }} {{~ end ~}} ) { - _HandleBehavior = HandleBehavior; + _handleBehavior = handleBehavior; {{~ for behavior in behaviors ~}} _{{ behavior.variable_name }} = {{ behavior.variable_name }}; {{~ end ~}} {{~ for behavior in (behaviors | array.reverse) ~}} {{~ if for.first ~}} - _{{ behavior.variable_name }}.SetInnerHandler(_HandleBehavior); + _{{ behavior.variable_name }}.SetInnerHandler(_handleBehavior); {{~ else ~}} _{{ behavior.variable_name }}.SetInnerHandler(_{{ behaviors[behaviors.size - for.index].variable_name }}); {{~ end ~}} @@ -48,7 +48,7 @@ partial class {{ class_name }} .HandleAsync(request, cancellationToken) .ConfigureAwait(false); {{~ else ~}} - return await _HandleBehavior + return await _handleBehavior .HandleAsync(request, cancellationToken) .ConfigureAwait(false); {{~ end ~}} diff --git a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs index a59b479b..0b3fa5d1 100644 --- a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs +++ b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs @@ -9,7 +9,7 @@ partial class GetUsersQuery { public sealed class Handler : global::Immediate.Handlers.Shared.IHandler> { - private readonly global::Dummy.GetUsersQuery.HandleBehavior _HandleBehavior; + private readonly global::Dummy.GetUsersQuery.HandleBehavior _handleBehavior; private readonly global::YetAnotherDummy.SecondLoggingBehavior> _secondLoggingBehavior1; private readonly global::YetAnotherDummy.LoggingBehavior> _loggingBehavior1; private readonly global::Dummy.SecondLoggingBehavior> _secondLoggingBehavior; @@ -17,7 +17,7 @@ public sealed class Handler : global::Immediate.Handlers.Shared.IHandler> _loggingBehavior; public Handler( - global::Dummy.GetUsersQuery.HandleBehavior HandleBehavior, + global::Dummy.GetUsersQuery.HandleBehavior handleBehavior, global::YetAnotherDummy.SecondLoggingBehavior> secondLoggingBehavior1, global::YetAnotherDummy.LoggingBehavior> loggingBehavior1, global::Dummy.SecondLoggingBehavior> secondLoggingBehavior, @@ -25,14 +25,14 @@ public Handler( global::Dummy.LoggingBehavior> loggingBehavior ) { - _HandleBehavior = HandleBehavior; + _handleBehavior = handleBehavior; _loggingBehavior = loggingBehavior; _otherBehavior = otherBehavior; _secondLoggingBehavior = secondLoggingBehavior; _loggingBehavior1 = loggingBehavior1; _secondLoggingBehavior1 = secondLoggingBehavior1; - _secondLoggingBehavior1.SetInnerHandler(_HandleBehavior); + _secondLoggingBehavior1.SetInnerHandler(_handleBehavior); _loggingBehavior1.SetInnerHandler(_secondLoggingBehavior1); _secondLoggingBehavior.SetInnerHandler(_loggingBehavior1); _otherBehavior.SetInnerHandler(_secondLoggingBehavior); diff --git a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs index 432fa7bf..c64d062e 100644 --- a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs +++ b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/MultipleBehaviorTest.MultipleBehaviors_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs @@ -7,7 +7,7 @@ partial class GetUsersQuery { public sealed class Handler : global::Immediate.Handlers.Shared.IHandler> { - private readonly global::Dummy.GetUsersQuery.HandleBehavior _HandleBehavior; + private readonly global::Dummy.GetUsersQuery.HandleBehavior _handleBehavior; private readonly global::YetAnotherDummy.SecondLoggingBehavior> _secondLoggingBehavior1; private readonly global::YetAnotherDummy.LoggingBehavior> _loggingBehavior1; private readonly global::Dummy.SecondLoggingBehavior> _secondLoggingBehavior; @@ -15,7 +15,7 @@ public sealed class Handler : global::Immediate.Handlers.Shared.IHandler> _loggingBehavior; public Handler( - global::Dummy.GetUsersQuery.HandleBehavior HandleBehavior, + global::Dummy.GetUsersQuery.HandleBehavior handleBehavior, global::YetAnotherDummy.SecondLoggingBehavior> secondLoggingBehavior1, global::YetAnotherDummy.LoggingBehavior> loggingBehavior1, global::Dummy.SecondLoggingBehavior> secondLoggingBehavior, @@ -23,14 +23,14 @@ public Handler( global::Dummy.LoggingBehavior> loggingBehavior ) { - _HandleBehavior = HandleBehavior; + _handleBehavior = handleBehavior; _loggingBehavior = loggingBehavior; _otherBehavior = otherBehavior; _secondLoggingBehavior = secondLoggingBehavior; _loggingBehavior1 = loggingBehavior1; _secondLoggingBehavior1 = secondLoggingBehavior1; - _secondLoggingBehavior1.SetInnerHandler(_HandleBehavior); + _secondLoggingBehavior1.SetInnerHandler(_handleBehavior); _loggingBehavior1.SetInnerHandler(_secondLoggingBehavior1); _secondLoggingBehavior.SetInnerHandler(_loggingBehavior1); _otherBehavior.SetInnerHandler(_secondLoggingBehavior); diff --git a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs index 26a87dfd..1c7294af 100644 --- a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs +++ b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Msdi#Dummy.GetUsersQuery.g.verified.cs @@ -9,18 +9,18 @@ partial class GetUsersQuery { public sealed class Handler : global::Immediate.Handlers.Shared.IHandler> { - private readonly global::Dummy.GetUsersQuery.HandleBehavior _HandleBehavior; + private readonly global::Dummy.GetUsersQuery.HandleBehavior _handleBehavior; private readonly global::Dummy.LoggingBehavior> _loggingBehavior; public Handler( - global::Dummy.GetUsersQuery.HandleBehavior HandleBehavior, + global::Dummy.GetUsersQuery.HandleBehavior handleBehavior, global::Dummy.LoggingBehavior> loggingBehavior ) { - _HandleBehavior = HandleBehavior; + _handleBehavior = handleBehavior; _loggingBehavior = loggingBehavior; - _loggingBehavior.SetInnerHandler(_HandleBehavior); + _loggingBehavior.SetInnerHandler(_handleBehavior); } public async global::System.Threading.Tasks.ValueTask> HandleAsync( diff --git a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs index 5c7527a5..33054ffe 100644 --- a/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs +++ b/tests/Immediate.Handlers.Tests/GeneratorTests/Behaviors/SingleBehaviorTest.SingleBehavior_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs @@ -7,18 +7,18 @@ partial class GetUsersQuery { public sealed class Handler : global::Immediate.Handlers.Shared.IHandler> { - private readonly global::Dummy.GetUsersQuery.HandleBehavior _HandleBehavior; + private readonly global::Dummy.GetUsersQuery.HandleBehavior _handleBehavior; private readonly global::Dummy.LoggingBehavior> _loggingBehavior; public Handler( - global::Dummy.GetUsersQuery.HandleBehavior HandleBehavior, + global::Dummy.GetUsersQuery.HandleBehavior handleBehavior, global::Dummy.LoggingBehavior> loggingBehavior ) { - _HandleBehavior = HandleBehavior; + _handleBehavior = handleBehavior; _loggingBehavior = loggingBehavior; - _loggingBehavior.SetInnerHandler(_HandleBehavior); + _loggingBehavior.SetInnerHandler(_handleBehavior); } public async global::System.Threading.Tasks.ValueTask> HandleAsync( diff --git a/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.IntReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs b/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.IntReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs index c467ea0d..5c63b4d2 100644 --- a/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.IntReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs +++ b/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.IntReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs @@ -7,13 +7,13 @@ partial class GetUsersQuery { public sealed class Handler : global::Immediate.Handlers.Shared.IHandler { - private readonly global::Dummy.GetUsersQuery.HandleBehavior _HandleBehavior; + private readonly global::Dummy.GetUsersQuery.HandleBehavior _handleBehavior; public Handler( - global::Dummy.GetUsersQuery.HandleBehavior HandleBehavior + global::Dummy.GetUsersQuery.HandleBehavior handleBehavior ) { - _HandleBehavior = HandleBehavior; + _handleBehavior = handleBehavior; } @@ -22,7 +22,7 @@ public Handler( global::System.Threading.CancellationToken cancellationToken = default ) { - return await _HandleBehavior + return await _handleBehavior .HandleAsync(request, cancellationToken) .ConfigureAwait(false); } diff --git a/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.VoidReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs b/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.VoidReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs index 169711cb..220339d9 100644 --- a/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.VoidReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs +++ b/tests/Immediate.Handlers.Tests/GeneratorTests/SimpleHandler/SimpleHandlerTests.VoidReturnType_assemblies=Normal#Dummy.GetUsersQuery.g.verified.cs @@ -7,13 +7,13 @@ partial class GetUsersQuery { public sealed class Handler : global::Immediate.Handlers.Shared.IHandler { - private readonly global::Dummy.GetUsersQuery.HandleBehavior _HandleBehavior; + private readonly global::Dummy.GetUsersQuery.HandleBehavior _handleBehavior; public Handler( - global::Dummy.GetUsersQuery.HandleBehavior HandleBehavior + global::Dummy.GetUsersQuery.HandleBehavior handleBehavior ) { - _HandleBehavior = HandleBehavior; + _handleBehavior = handleBehavior; } @@ -22,7 +22,7 @@ public Handler( global::System.Threading.CancellationToken cancellationToken = default ) { - return await _HandleBehavior + return await _handleBehavior .HandleAsync(request, cancellationToken) .ConfigureAwait(false); }