diff --git a/src/Mediator.SourceGenerator.Implementation/resources/Mediator.sbn-cs b/src/Mediator.SourceGenerator.Implementation/resources/Mediator.sbn-cs index 3f880b1..a91ab93 100644 --- a/src/Mediator.SourceGenerator.Implementation/resources/Mediator.sbn-cs +++ b/src/Mediator.SourceGenerator.Implementation/resources/Mediator.sbn-cs @@ -3,6 +3,7 @@ // #pragma warning disable CS8019 // Unused usings +#pragma warning disable CS8321 // Unused local function using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -93,7 +94,7 @@ namespace Microsoft.Extensions.DependencyInjection services.AddSingleton(); return services; - + {{~ if HasNotifications ~}} [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] static global::System.Func GetRequiredService() where T : notnull => sp => sp.GetRequiredService(); @@ -202,7 +203,7 @@ namespace {{ MediatorNamespace }} _getServicesLength = sp.GetServices() is global::Microsoft.Extensions.DependencyInjection.MediatorDependencyInjectionExtensions.Dummy[] ? (s => ((object[])s).Length) : (s => s.Count()); } - + {{~ if ServiceLifetimeIsSingleton ~}} {{ if IsTestRun }}internal{{ else }}private{{ end }} struct FastLazyValue where T : struct diff --git a/src/Mediator.SourceGenerator.Implementation/resources/MediatorFallback.sbn-cs b/src/Mediator.SourceGenerator.Implementation/resources/MediatorFallback.sbn-cs index d4eb3a3..89229f0 100644 --- a/src/Mediator.SourceGenerator.Implementation/resources/MediatorFallback.sbn-cs +++ b/src/Mediator.SourceGenerator.Implementation/resources/MediatorFallback.sbn-cs @@ -3,6 +3,7 @@ // #pragma warning disable CS8019 // Unused usings +#pragma warning disable CS8321 // Unused local function using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -16,12 +17,13 @@ namespace Microsoft.Extensions.DependencyInjection /// DI extensions for Mediator. /// [global::System.CodeDom.Compiler.GeneratedCode("Mediator.SourceGenerator", "{{ GeneratorVersion }}")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.Diagnostics.DebuggerStepThroughAttribute] public static class MediatorDependencyInjectionExtensions { /// /// Adds the Mediator implementation and handlers of your application. /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static IServiceCollection AddMediator(this IServiceCollection services) { return AddMediator(services, null); @@ -32,7 +34,6 @@ namespace Microsoft.Extensions.DependencyInjection /// /// Adds the Mediator implementation and handlers of your application, with specified options. /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static IServiceCollection AddMediator(this IServiceCollection services, global::System.Action options) { services.AddSingleton();