diff --git a/Directory.Build.props b/Directory.Build.props index b89c23a5..3debdaa3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 2.1.0-beta.6 + 2.2.0-beta.1 MIT diff --git a/examples/MinimalLambda.Example.ClassMiddleware/Program.cs b/examples/MinimalLambda.Example.ClassMiddleware/Program.cs index 66036bd8..a3fba9a2 100644 --- a/examples/MinimalLambda.Example.ClassMiddleware/Program.cs +++ b/examples/MinimalLambda.Example.ClassMiddleware/Program.cs @@ -9,6 +9,8 @@ var lambda = builder.Build(); +lambda.UseMiddleware(); + lambda.MapHandler( ([FromEvent] Request request) => new Response($"Hello {request.Name}!", DateTime.UtcNow) ); diff --git a/src/MinimalLambda.SourceGenerators/Emitters/InvocationHandlerEmitter.cs b/src/MinimalLambda.SourceGenerators/Emitters/InvocationHandlerEmitter.cs new file mode 100644 index 00000000..dd7fed94 --- /dev/null +++ b/src/MinimalLambda.SourceGenerators/Emitters/InvocationHandlerEmitter.cs @@ -0,0 +1,27 @@ +using System.Collections.Immutable; +using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; + +namespace MinimalLambda.SourceGenerators.Emitters; + +internal static class InvocationHandlerEmitter +{ + private const string LambdaHostMapHandlerExtensionsTemplateFile = + "Templates/MapHandler.scriban"; + + internal static void Emit( + SourceProductionContext context, + ImmutableArray infos + ) + { + if (infos.Length == 0) + return; + + var code = TemplateHelper.Render( + LambdaHostMapHandlerExtensionsTemplateFile, + new { TemplateHelper.GeneratedCodeAttribute, MapHandlerCalls = infos } + ); + + context.AddSource("MinimalLambda.InvocationHandlers.g.cs", code); + } +} diff --git a/src/MinimalLambda.SourceGenerators/Emitters/LifecycleHandlerEmitter.cs b/src/MinimalLambda.SourceGenerators/Emitters/LifecycleHandlerEmitter.cs new file mode 100644 index 00000000..245c7a39 --- /dev/null +++ b/src/MinimalLambda.SourceGenerators/Emitters/LifecycleHandlerEmitter.cs @@ -0,0 +1,34 @@ +using System.Collections.Immutable; +using System.Linq; +using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; + +namespace MinimalLambda.SourceGenerators.Emitters; + +internal static class LifecycleHandlerEmitter +{ + private const string GenericHandlerTemplateFile = "Templates/GenericHandler.scriban"; + + internal static void Emit( + SourceProductionContext context, + ImmutableArray infos + ) + { + if (infos.Length == 0) + return; + + var name = infos.First().MethodType; + + var code = TemplateHelper.Render( + GenericHandlerTemplateFile, + new + { + TemplateHelper.GeneratedCodeAttribute, + Name = name, + Calls = infos, + } + ); + + context.AddSource($"MinimalLambda.{name}Handlers.g.cs", code); + } +} diff --git a/src/MinimalLambda.SourceGenerators/Emitters/MiddlewareClassEmitter.cs b/src/MinimalLambda.SourceGenerators/Emitters/MiddlewareClassEmitter.cs new file mode 100644 index 00000000..e5b30f80 --- /dev/null +++ b/src/MinimalLambda.SourceGenerators/Emitters/MiddlewareClassEmitter.cs @@ -0,0 +1,26 @@ +using System.Collections.Immutable; +using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; + +namespace MinimalLambda.SourceGenerators.Emitters; + +internal static class MiddlewareClassEmitter +{ + private const string UseMiddlewareTTemplateFile = "Templates/UseMiddlewareT.scriban"; + + internal static void Emit( + SourceProductionContext context, + ImmutableArray infos + ) + { + if (infos.Length == 0) + return; + + var code = TemplateHelper.Render( + UseMiddlewareTTemplateFile, + new { TemplateHelper.GeneratedCodeAttribute, Calls = infos } + ); + + context.AddSource("MinimalLambda.UseMiddleware.g.cs", code); + } +} diff --git a/src/MinimalLambda.SourceGenerators/Emitters/MinimalLambdaEmitter.cs b/src/MinimalLambda.SourceGenerators/Emitters/MinimalLambdaEmitter.cs deleted file mode 100644 index a643b72d..00000000 --- a/src/MinimalLambda.SourceGenerators/Emitters/MinimalLambdaEmitter.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Microsoft.CodeAnalysis; -using MinimalLambda.SourceGenerators.Models; - -namespace MinimalLambda.SourceGenerators.Emitters; - -internal static class MinimalLambdaEmitter -{ - internal static readonly Lazy GeneratedCodeAttribute = new(() => - { - var assembly = Assembly.GetExecutingAssembly(); - var generatorName = assembly.GetName().Name; - var generatorVersion = assembly.GetName().Version; - - return $"""[global::System.CodeDom.Compiler.GeneratedCode("{generatorName}", "{generatorVersion}")]"""; - }); - - internal static void Generate(SourceProductionContext context, CompilationInfo compilationInfo) - { - // validate the generator data and report any diagnostics before exiting. - var diagnostics = DiagnosticGenerator.GenerateDiagnostics(compilationInfo); - if (diagnostics.Any()) - { - diagnostics.ForEach(context.ReportDiagnostic); - - // if there are any errors, return without generating any source code. - if (diagnostics.Any(d => d.Severity == DiagnosticSeverity.Error)) - return; - } - - List outputs = - [ - TemplateHelper.Render( - GeneratorConstants.InterceptsLocationAttributeTemplateFile, - new { GeneratedCodeAttribute } - ), - """ - namespace MinimalLambda.Generated - { - using System; - using System.Runtime.CompilerServices; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Extensions.DependencyInjection; - using MinimalLambda; - using MinimalLambda.Builder; - - """, - ]; - - // if MapHandler calls found, generate the source code. - if (compilationInfo.MapHandlerInvocationInfos.Count >= 1) - outputs.Add( - TemplateHelper.Render( - GeneratorConstants.LambdaHostMapHandlerExtensionsTemplateFile, - new - { - GeneratedCodeAttribute, - MapHandlerCalls = compilationInfo.MapHandlerInvocationInfos, - } - ) - ); - - // add UseMiddleware interceptors - if (compilationInfo.UseMiddlewareTInfos.Count >= 1) - outputs.Add( - TemplateHelper.Render( - GeneratorConstants.UseMiddlewareTTemplateFile, - new { GeneratedCodeAttribute, Calls = compilationInfo.UseMiddlewareTInfos } - ) - ); - - // add OnInit interceptors - if (compilationInfo.OnInitInvocationInfos.Count >= 1) - outputs.Add( - TemplateHelper.Render( - GeneratorConstants.GenericHandlerTemplateFile, - new - { - Name = compilationInfo.OnInitInvocationInfos.First().MethodType, - Calls = compilationInfo.OnInitInvocationInfos, - GeneratedCodeAttribute, - } - ) - ); - - // add OnShutdown interceptors - if (compilationInfo.OnShutdownInvocationInfos.Count >= 1) - outputs.Add( - TemplateHelper.Render( - GeneratorConstants.GenericHandlerTemplateFile, - new - { - Name = compilationInfo.OnShutdownInvocationInfos.First().MethodType, - Calls = compilationInfo.OnShutdownInvocationInfos, - GeneratedCodeAttribute, - } - ) - ); - - outputs.Add( - """ - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } - } - """ - ); - - // join all the source code together and add it to the compilation context. - var outCode = string.Join("\n", outputs.Where(s => s != null)); - - // add the source code to the compilation context. - context.AddSource("LambdaHandler.g.cs", outCode); - } -} diff --git a/src/MinimalLambda.SourceGenerators/Emitters/TemplateHelper.cs b/src/MinimalLambda.SourceGenerators/Emitters/TemplateHelper.cs index f45c3403..cb2f2133 100644 --- a/src/MinimalLambda.SourceGenerators/Emitters/TemplateHelper.cs +++ b/src/MinimalLambda.SourceGenerators/Emitters/TemplateHelper.cs @@ -13,6 +13,15 @@ namespace MinimalLambda.SourceGenerators.Emitters; /// internal static class TemplateHelper { + internal static readonly Lazy GeneratedCodeAttribute = new(() => + { + var assembly = Assembly.GetExecutingAssembly(); + var generatorName = assembly.GetName().Name; + var generatorVersion = assembly.GetName().Version; + + return $"""[global::System.CodeDom.Compiler.GeneratedCode("{generatorName}", "{generatorVersion}")]"""; + }); + private static readonly ConcurrentDictionary Cache = new(); /// diff --git a/src/MinimalLambda.SourceGenerators/Extensions/FunctionalExtensions.cs b/src/MinimalLambda.SourceGenerators/Extensions/FunctionalExtensions.cs index da86fc43..0759428b 100644 --- a/src/MinimalLambda.SourceGenerators/Extensions/FunctionalExtensions.cs +++ b/src/MinimalLambda.SourceGenerators/Extensions/FunctionalExtensions.cs @@ -5,11 +5,5 @@ internal static class FunctionalExtensions extension(T source) { public TResult Map(Func func) => func(source); - - public T Tap(Action action) - { - action(source); - return source; - } } } diff --git a/src/MinimalLambda.SourceGenerators/Extensions/IncrementalValueProviderExtensions.cs b/src/MinimalLambda.SourceGenerators/Extensions/IncrementalValueProviderExtensions.cs index 58f1f66a..8bf2f2ae 100644 --- a/src/MinimalLambda.SourceGenerators/Extensions/IncrementalValueProviderExtensions.cs +++ b/src/MinimalLambda.SourceGenerators/Extensions/IncrementalValueProviderExtensions.cs @@ -1,3 +1,6 @@ +using System.Linq; +using MinimalLambda.SourceGenerators.Models; + namespace Microsoft.CodeAnalysis; internal static class IncrementalValueProviderExtensions @@ -8,4 +11,15 @@ internal static class IncrementalValueProviderExtensions public IncrementalValuesProvider WhereNotNull() => valueProviders.Where(static v => v is not null).Select(static (v, _) => v!); } + + extension(IncrementalValuesProvider valueProviders) + where T : IMethodInfo + { + public IncrementalValuesProvider WhereNoErrors() => + valueProviders.Where(static c => + c.DiagnosticInfos.All(d => + d.DiagnosticDescriptor.DefaultSeverity != DiagnosticSeverity.Error + ) + ); + } } diff --git a/src/MinimalLambda.SourceGenerators/GeneratorConstants.cs b/src/MinimalLambda.SourceGenerators/GeneratorConstants.cs deleted file mode 100644 index ae0e2a6c..00000000 --- a/src/MinimalLambda.SourceGenerators/GeneratorConstants.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace MinimalLambda.SourceGenerators; - -/// Constants for attribute names used in source generation. -internal static class AttributeConstants -{ - internal const string MiddlewareConstructor = - "MinimalLambda.Builder.MiddlewareConstructorAttribute"; -} - -internal static class GeneratorConstants -{ - internal const string InterceptsLocationAttributeTemplateFile = - "Templates/InterceptsLocationAttribute.scriban"; - - internal const string LambdaHostMapHandlerExtensionsTemplateFile = - "Templates/MapHandler.scriban"; - - internal const string UseMiddlewareTTemplateFile = "Templates/UseMiddlewareT.scriban"; - - internal const string GenericHandlerTemplateFile = "Templates/GenericHandler.scriban"; -} diff --git a/src/MinimalLambda.SourceGenerators/GeneratorContext.cs b/src/MinimalLambda.SourceGenerators/GeneratorContext.cs index c5556178..aee0b820 100644 --- a/src/MinimalLambda.SourceGenerators/GeneratorContext.cs +++ b/src/MinimalLambda.SourceGenerators/GeneratorContext.cs @@ -8,15 +8,12 @@ internal class GeneratorContext internal WellKnownTypes.WellKnownTypes WellKnownTypes { get; } internal CancellationToken CancellationToken { get; } internal SemanticModel SemanticModel { get; } - internal GeneratorSyntaxContext GeneratorAttributeSyntaxContext { get; } - internal SyntaxNode Node { get; } internal GeneratorContext(GeneratorSyntaxContext context, CancellationToken cancellationToken) { - GeneratorAttributeSyntaxContext = context; Node = context.Node; - SemanticModel = GeneratorAttributeSyntaxContext.SemanticModel; + SemanticModel = context.SemanticModel; CancellationToken = cancellationToken; WellKnownTypes = SourceGenerators.WellKnownTypes.WellKnownTypes.GetOrCreate( context.SemanticModel.Compilation diff --git a/src/MinimalLambda.SourceGenerators/MinimalLambdaGenerator.cs b/src/MinimalLambda.SourceGenerators/MinimalLambdaGenerator.cs index 69eda7fd..77dd17c7 100644 --- a/src/MinimalLambda.SourceGenerators/MinimalLambdaGenerator.cs +++ b/src/MinimalLambda.SourceGenerators/MinimalLambdaGenerator.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using MinimalLambda.SourceGenerators.Emitters; @@ -49,48 +48,39 @@ is CSharpCompilation ) .WhereNotNull(); - var registrationCallsCollected = registrationCalls.Collect(); - var useMiddlewareTCallsCollected = useMiddlewareTCalls.Collect(); + var invocationHandlerCalls = registrationCalls + .WhereNoErrors() + .Where(static c => c is MapHandlerMethodInfo) + .Select(static (c, _) => (MapHandlerMethodInfo)c) + .Collect(); - // combine the compilation and map handler calls - var combined = registrationCallsCollected - .Combine(useMiddlewareTCallsCollected) - .Select( - CompilationInfo? (t, _) => - { - var (handlerInfos, useMiddlewareInfo) = t; + var onInitHandlerCalls = registrationCalls + .WhereNoErrors() + .Where(static c => c is LifecycleMethodInfo { MethodType: MethodType.OnInit }) + .Select(static (c, _) => (LifecycleMethodInfo)c) + .Collect(); - if (handlerInfos.Length == 0 && useMiddlewareInfo.Length == 0) - return null; + var onShutdownHandlerCalls = registrationCalls + .WhereNoErrors() + .Where(static c => c is LifecycleMethodInfo { MethodType: MethodType.OnShutdown }) + .Select(static (c, _) => (LifecycleMethodInfo)c) + .Collect(); - return new CompilationInfo - { - MapHandlerInvocationInfos = handlerInfos - .OfType() - .ToEquatableArray(), - OnShutdownInvocationInfos = handlerInfos - .OfType() - .Where(h => h.MethodType == MethodType.OnShutdown) - .ToEquatableArray(), - OnInitInvocationInfos = handlerInfos - .OfType() - .Where(h => h.MethodType == MethodType.OnInit) - .ToEquatableArray(), - UseMiddlewareTInfos = useMiddlewareInfo.ToEquatableArray(), - }; - } - ); + var middlewareTCallsCollected = useMiddlewareTCalls.WhereNoErrors().Collect(); - // Generate source when calls are found context.RegisterSourceOutput( - combined, - (productionContext, info) => - { - if (info is null) - return; + registrationCalls, + (ctx, call) => call.DiagnosticInfos.ForEach(d => d.ReportDiagnostic(ctx)) + ); - MinimalLambdaEmitter.Generate(productionContext, info.Value); - } + context.RegisterSourceOutput( + useMiddlewareTCalls, + (ctx, call) => call.DiagnosticInfos.ForEach(d => d.ReportDiagnostic(ctx)) ); + + context.RegisterSourceOutput(invocationHandlerCalls, InvocationHandlerEmitter.Emit); + context.RegisterSourceOutput(onInitHandlerCalls, LifecycleHandlerEmitter.Emit); + context.RegisterSourceOutput(onShutdownHandlerCalls, LifecycleHandlerEmitter.Emit); + context.RegisterSourceOutput(middlewareTCallsCollected, MiddlewareClassEmitter.Emit); } } diff --git a/src/MinimalLambda.SourceGenerators/Models/Handlers/LifecycleMethodInfo.cs b/src/MinimalLambda.SourceGenerators/Models/Handlers/LifecycleMethodInfo.cs index f5eb1e76..7272973c 100644 --- a/src/MinimalLambda.SourceGenerators/Models/Handlers/LifecycleMethodInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/Handlers/LifecycleMethodInfo.cs @@ -17,7 +17,8 @@ internal record LifecycleMethodInfo( string HandleResponseAssignment, string HandleReturningFromMethod, string ReturnType, - bool HasAnyFromKeyedServices + bool HasAnyFromKeyedServices, + string BuilderName ) : IMethodInfo; internal static class LifecycleMethodInfoExtensions @@ -85,6 +86,7 @@ methodSymbol.ReturnType is INamedTypeSymbol namedTypeSymbol var hasAnyKeyedServices = assignments.Any(a => a is { IsFromKeyedService: true }); return new LifecycleMethodInfo( + BuilderName: "ILambdaOnInitBuilder", MethodType: MethodType.OnInit, InterceptableLocationAttribute: interceptableLocation.Attribute, DelegateCastType: handlerCastType, @@ -133,6 +135,7 @@ GeneratorContext context var hasAnyKeyedServices = assignments.Any(a => a is { IsFromKeyedService: true }); return new LifecycleMethodInfo( + BuilderName: "ILambdaOnShutdownBuilder", MethodType: MethodType.OnShutdown, InterceptableLocationAttribute: interceptableLocation.Attribute, DelegateCastType: handlerCastType, diff --git a/src/MinimalLambda.SourceGenerators/Models/Handlers/MethodType.cs b/src/MinimalLambda.SourceGenerators/Models/Handlers/MethodType.cs index 2ab84812..bd7d1986 100644 --- a/src/MinimalLambda.SourceGenerators/Models/Handlers/MethodType.cs +++ b/src/MinimalLambda.SourceGenerators/Models/Handlers/MethodType.cs @@ -5,4 +5,5 @@ internal enum MethodType MapHandler, OnInit, OnShutdown, + UseMiddlewareT, } diff --git a/src/MinimalLambda.SourceGenerators/Models/Middleware/MiddlewareClassInfo.cs b/src/MinimalLambda.SourceGenerators/Models/Middleware/MiddlewareClassInfo.cs index e8503fb3..9c03be0c 100644 --- a/src/MinimalLambda.SourceGenerators/Models/Middleware/MiddlewareClassInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/Middleware/MiddlewareClassInfo.cs @@ -19,6 +19,9 @@ bool AllParametersFromServices internal static class MiddlewareExtensions { + private const string MiddlewareConstructor = + "MinimalLambda.Builder.MiddlewareConstructorAttribute"; + extension(MiddlewareClassInfo) { internal static (MiddlewareClassInfo? Info, List Diagnostics) Create( @@ -126,7 +129,7 @@ a.AttributeClass is not null DiagnosticInfo.Create( Diagnostics.MultipleConstructorsWithAttribute, c.Locations.FirstOrDefault()?.ToLocationInfo(), - [AttributeConstants.MiddlewareConstructor] + [MiddlewareConstructor] ) ) .ToArray() diff --git a/src/MinimalLambda.SourceGenerators/Models/Middleware/UseMiddlewareTInfo.cs b/src/MinimalLambda.SourceGenerators/Models/Middleware/UseMiddlewareTInfo.cs index 6fd7ee1c..8531bdfe 100644 --- a/src/MinimalLambda.SourceGenerators/Models/Middleware/UseMiddlewareTInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/Middleware/UseMiddlewareTInfo.cs @@ -12,8 +12,9 @@ namespace MinimalLambda.SourceGenerators.Models; internal record UseMiddlewareTInfo( string? InterceptableLocationAttribute, MiddlewareClassInfo? ClassInfo, - EquatableArray DiagnosticInfos -); + EquatableArray DiagnosticInfos, + MethodType MethodType +) : IMethodInfo; internal static class UseMiddlewareTInfoExtensions { @@ -66,7 +67,8 @@ typeSymbol as INamedTypeSymbol return new UseMiddlewareTInfo( interceptableLocation, classInfo, - diagnosticInfos.ToEquatableArray() + diagnosticInfos.ToEquatableArray(), + MethodType.UseMiddlewareT ); } } diff --git a/src/MinimalLambda.SourceGenerators/Models/Shared/CompilationInfo.cs b/src/MinimalLambda.SourceGenerators/Models/Shared/CompilationInfo.cs index 3862f513..d8d6ed1a 100644 --- a/src/MinimalLambda.SourceGenerators/Models/Shared/CompilationInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/Shared/CompilationInfo.cs @@ -2,7 +2,7 @@ namespace MinimalLambda.SourceGenerators.Models; -internal readonly record struct CompilationInfo( +internal sealed record CompilationInfo( EquatableArray MapHandlerInvocationInfos, EquatableArray OnShutdownInvocationInfos, EquatableArray OnInitInvocationInfos, diff --git a/src/MinimalLambda.SourceGenerators/Templates/GenericHandler.scriban b/src/MinimalLambda.SourceGenerators/Templates/GenericHandler.scriban index b63b9555..97292fe3 100644 --- a/src/MinimalLambda.SourceGenerators/Templates/GenericHandler.scriban +++ b/src/MinimalLambda.SourceGenerators/Templates/GenericHandler.scriban @@ -1,18 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable + +namespace System.Runtime.CompilerServices +{ + using System.CodeDom.Compiler; + {{ generated_code_attribute.value }} - file static class GeneratedLambda{{ name }}BuilderExtensions + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + file sealed class InterceptsLocationAttribute : Attribute + { + public InterceptsLocationAttribute(int version, string data) { } + } +} + +namespace MinimalLambda.Generated +{ + using System; + using System.Runtime.CompilerServices; + using System.Threading; + using System.Threading.Tasks; + using Microsoft.Extensions.DependencyInjection; + using MinimalLambda; + using MinimalLambda.Builder; + + {{ generated_code_attribute.value }} + file static class GeneratedLambda{{ name }}Extensions { {{~ for call in calls ~}} {{ call.interceptable_location_attribute }} - internal static ILambda{{ name }}Builder {{ name }}Interceptor{{ for.index }}( - this ILambda{{ name }}Builder application, + internal static {{ call.builder_name }} {{ call.method_type }}Interceptor{{ for.index }}( + this {{ call.builder_name }} application, Delegate handler ) { var castHandler = Utilities.Cast(handler, {{ call.delegate_cast_type }}); - return application.{{ name }}({{ name }}); + return application.{{ call.method_type }}({{ call.method_type }}); - {{ if call.should_await ~}} async {{ end ~}}{{ call.return_type }} {{ name }}(ILambdaLifecycleContext context) + {{ if call.should_await ~}} async {{ end ~}}{{ call.return_type }} {{ call.method_type }}(ILambdaLifecycleContext context) { {{~ if call.has_any_from_keyed_services ~}} if (context.ServiceProvider.GetService() is not IServiceProviderIsKeyedService) @@ -33,4 +66,10 @@ {{~ end ~}} {{~ end ~}} - } \ No newline at end of file + } + + file static class Utilities + { + internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; + } +} \ No newline at end of file diff --git a/src/MinimalLambda.SourceGenerators/Templates/InterceptsLocationAttribute.scriban b/src/MinimalLambda.SourceGenerators/Templates/InterceptsLocationAttribute.scriban deleted file mode 100644 index b741545d..00000000 --- a/src/MinimalLambda.SourceGenerators/Templates/InterceptsLocationAttribute.scriban +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - -#nullable enable - -namespace System.Runtime.CompilerServices -{ - using System.CodeDom.Compiler; - - {{ generated_code_attribute.value }} - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} diff --git a/src/MinimalLambda.SourceGenerators/Templates/MapHandler.scriban b/src/MinimalLambda.SourceGenerators/Templates/MapHandler.scriban index 0c80b3bf..d65f2e8c 100644 --- a/src/MinimalLambda.SourceGenerators/Templates/MapHandler.scriban +++ b/src/MinimalLambda.SourceGenerators/Templates/MapHandler.scriban @@ -1,3 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable + +namespace System.Runtime.CompilerServices +{ + using System.CodeDom.Compiler; + + {{ generated_code_attribute.value }} + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + file sealed class InterceptsLocationAttribute : Attribute + { + public InterceptsLocationAttribute(int version, string data) { } + } +} + +namespace MinimalLambda.Generated +{ + using System; + using System.Runtime.CompilerServices; + using System.Threading; + using System.Threading.Tasks; + using Microsoft.Extensions.DependencyInjection; + using MinimalLambda; + using MinimalLambda.Builder; + {{ generated_code_attribute.value }} file static class GeneratedLambdaInvocationBuilderExtensions { @@ -61,3 +94,9 @@ } {{~ end ~}} } + + file static class Utilities + { + internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; + } +} \ No newline at end of file diff --git a/src/MinimalLambda.SourceGenerators/Templates/UseMiddlewareT.scriban b/src/MinimalLambda.SourceGenerators/Templates/UseMiddlewareT.scriban index 6ce077fd..04726c44 100644 --- a/src/MinimalLambda.SourceGenerators/Templates/UseMiddlewareT.scriban +++ b/src/MinimalLambda.SourceGenerators/Templates/UseMiddlewareT.scriban @@ -1,3 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#nullable enable + +namespace System.Runtime.CompilerServices +{ + using System.CodeDom.Compiler; + + {{ generated_code_attribute.value }} + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] + file sealed class InterceptsLocationAttribute : Attribute + { + public InterceptsLocationAttribute(int version, string data) { } + } +} + +namespace MinimalLambda.Generated +{ + using System; + using System.Runtime.CompilerServices; + using System.Threading; + using System.Threading.Tasks; + using Microsoft.Extensions.DependencyInjection; + using MinimalLambda; + using MinimalLambda.Builder; + {{ generated_code_attribute.value }} file static class UseMiddlewareExtensions { @@ -123,3 +156,4 @@ {{~ end ~}} {{~ end ~}} } +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/GeneratorTestHelpers.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/GeneratorTestHelpers.cs index c709cb4f..2cdc9d6d 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/GeneratorTestHelpers.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/GeneratorTestHelpers.cs @@ -16,7 +16,7 @@ namespace MinimalLambda.SourceGenerators.UnitTests; internal static class GeneratorTestHelpers { - internal static Task Verify(string source, int expectedTrees = 1) + internal static Task Verify(string source, int expectedTrees = -1) { var (driver, originalCompilation) = GenerateFromSource(source); @@ -63,7 +63,8 @@ internal static Task Verify(string source, int expectedTrees = 1) ) ); - result.GeneratedTrees.Length.Should().Be(expectedTrees); + if (expectedTrees > -1) + result.GeneratedTrees.Length.Should().Be(expectedTrees); return Verifier .Verify(driver) diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#MinimalLambda.InvocationHandlers.g.verified.cs index 5832736c..794bdd08 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -77,9 +73,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs index 8082a5d4..8afa55ec 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -70,7 +66,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs index 2b807f81..b1b6e658 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -68,9 +64,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs index 34fa03ba..16c8fced 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -73,9 +69,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#MinimalLambda.InvocationHandlers.g.verified.cs index ab237dd5..3e8f8573 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -78,9 +74,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs index 6a1fa381..24eedc00 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -78,7 +74,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#MinimalLambda.InvocationHandlers.g.verified.cs index eeb4e588..cff27ea1 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -77,9 +73,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs index 8082a5d4..8afa55ec 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -70,7 +66,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs index bdb69765..be3763ad 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -60,7 +56,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 93% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#MinimalLambda.InvocationHandlers.g.verified.cs index 9d69a184..0fd0242c 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -62,7 +58,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs index 3974a582..496e2cdc 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -72,9 +68,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#MinimalLambda.InvocationHandlers.g.verified.cs index 09b43da1..8fdba70e 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -76,9 +72,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#MinimalLambda.InvocationHandlers.g.verified.cs index acda23b0..55ae8ca6 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -72,9 +68,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#MinimalLambda.InvocationHandlers.g.verified.cs index 14d978a6..687c9b6a 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -73,9 +69,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaHostContext#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaHostContext#LambdaHandler.g.verified.cs deleted file mode 100644 index 4dca0f3f..00000000 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaHostContext#LambdaHandler.g.verified.cs +++ /dev/null @@ -1,82 +0,0 @@ -//HintName: LambdaHandler.g.cs -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - -#nullable enable - -namespace System.Runtime.CompilerServices -{ - using System.CodeDom.Compiler; - - [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} - -namespace MinimalLambda.Generated -{ - using System; - using System.CodeDom.Compiler; - using System.Runtime.CompilerServices; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Extensions.DependencyInjection; - using MinimalLambda; - using MinimalLambda.Builder; - - [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] - file static class GeneratedLambdaInvocationBuilderExtensions - { - private const string EventFeatureProviderKey = "__EventFeatureProvider"; - private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - - [InterceptsLocation(1, "FpwfFi8HLWXcIbdaQfstO+AAAABJbnB1dEZpbGUuY3M=")] - internal static ILambdaInvocationBuilder MapHandlerInterceptor0( - this ILambdaInvocationBuilder application, - Delegate handler - ) - { - var castHandler = (global::System.Func)handler; - - application.Handle(InvocationDelegate); - - if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) - application.Properties[ResponseFeatureProviderKey] = application. - Services.GetRequiredService() - .Create(); - - return application; - - Task InvocationDelegate(ILambdaInvocationContext context) - { - var arg0 = context.CancellationToken; - var arg1 = context; - var response = castHandler.Invoke(arg0, arg1); - if (context.Features.Get() is not IResponseFeature responseFeature) - { - throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); - } - responseFeature.SetResponse(response); - return Task.CompletedTask; - } - } - } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaInvocationContext#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaInvocationContext#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaInvocationContext#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaInvocationContext#MinimalLambda.InvocationHandlers.g.verified.cs index f3414fef..c4cdca54 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaInvocationContext#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaInvocationContext#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -73,9 +69,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#MinimalLambda.InvocationHandlers.g.verified.cs index bdb69765..be3763ad 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -60,7 +56,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#MinimalLambda.InvocationHandlers.g.verified.cs index 37d1b8e9..6e7ced60 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -78,9 +74,9 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#MinimalLambda.InvocationHandlers.g.verified.cs index 5e13b4a7..0d05e158 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -61,7 +57,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#MinimalLambda.InvocationHandlers.g.verified.cs index 488b51e2..21e1be3f 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -77,9 +73,9 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#MinimalLambda.InvocationHandlers.g.verified.cs index 488b51e2..21e1be3f 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -77,9 +73,9 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait_EventAndResponseDifferentNamespace#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait_EventAndResponseDifferentNamespace#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait_EventAndResponseDifferentNamespace#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait_EventAndResponseDifferentNamespace#MinimalLambda.InvocationHandlers.g.verified.cs index 00bbfe8c..08c06cf6 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait_EventAndResponseDifferentNamespace#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait_EventAndResponseDifferentNamespace#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -77,9 +73,9 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 93% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#MinimalLambda.InvocationHandlers.g.verified.cs index 94c64b0d..8dbad281 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -62,9 +58,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_DeserializerSerializer_NoOp#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_DeserializerSerializer_NoOp#LambdaHandler.g.verified.cs deleted file mode 100644 index aacf46ab..00000000 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_DeserializerSerializer_NoOp#LambdaHandler.g.verified.cs +++ /dev/null @@ -1,43 +0,0 @@ -//HintName: LambdaHandler.g.cs -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - -#nullable enable - -namespace System.Runtime.CompilerServices -{ - using System.CodeDom.Compiler; - - [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} - -namespace MinimalLambda.Generated -{ - using System; - using System.Runtime.CompilerServices; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Extensions.DependencyInjection; - using MinimalLambda; - using MinimalLambda.Builder; - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#MinimalLambda.InvocationHandlers.g.verified.cs index 5e13b4a7..0d05e158 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -61,7 +57,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#MinimalLambda.InvocationHandlers.g.verified.cs index e7a46fbd..05be90bc 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,7 +67,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#MinimalLambda.InvocationHandlers.g.verified.cs index 76f3e0a1..be06e381 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,7 +67,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#MinimalLambda.InvocationHandlers.g.verified.cs index f48d3571..2e8ff95e 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,7 +67,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs index 6c9452a0..970082c1 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -78,9 +74,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs index f6e58e3c..267ceb7d 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -78,7 +74,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnNullableValueType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnNullableValueType#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnNullableValueType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnNullableValueType#MinimalLambda.InvocationHandlers.g.verified.cs index e1ef8a9a..2b6cdd3b 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnNullableValueType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnNullableValueType#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -78,7 +74,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_OptionalInjectedParam#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_OptionalInjectedParam#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_OptionalInjectedParam#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_OptionalInjectedParam#MinimalLambda.InvocationHandlers.g.verified.cs index 342f3aea..ee5f9113 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_OptionalInjectedParam#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_OptionalInjectedParam#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -72,7 +68,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#MinimalLambda.InvocationHandlers.g.verified.cs index bdb69765..be3763ad 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -60,7 +56,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#MinimalLambda.InvocationHandlers.g.verified.cs index b376fae7..3226aad6 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -77,9 +73,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#MinimalLambda.InvocationHandlers.g.verified.cs index cf1e35e3..befff9be 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -67,9 +63,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#MinimalLambda.InvocationHandlers.g.verified.cs index 5e9a2a45..c6d8e42e 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -67,9 +63,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#MinimalLambda.InvocationHandlers.g.verified.cs index 7065b4c9..82bb974b 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -69,9 +65,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#MinimalLambda.InvocationHandlers.g.verified.cs index 2e581b92..532e70a1 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -68,9 +64,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#MinimalLambda.InvocationHandlers.g.verified.cs index 54aa5c8b..9b26079f 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -68,9 +64,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#MinimalLambda.InvocationHandlers.g.verified.cs index 762c71f9..02f96b2c 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -68,9 +64,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#MinimalLambda.InvocationHandlers.g.verified.cs index 5e13b4a7..0d05e158 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -61,7 +57,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs index 8082a5d4..8afa55ec 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -70,7 +66,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 95% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#MinimalLambda.InvocationHandlers.g.verified.cs index 8aa525ce..edefe2dd 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -83,9 +79,9 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs index e1fdb069..fbb9417b 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,7 +67,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast_Static#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast_Static#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast_Static#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast_Static#MinimalLambda.InvocationHandlers.g.verified.cs index e1fdb069..fbb9417b 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast_Static#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast_Static#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,7 +67,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#MinimalLambda.InvocationHandlers.g.verified.cs index 5e13b4a7..0d05e158 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -61,7 +57,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#MinimalLambda.InvocationHandlers.g.verified.cs index bdb69765..be3763ad 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -60,7 +56,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs index 8082a5d4..8afa55ec 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -70,7 +66,7 @@ async Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#MinimalLambda.InvocationHandlers.g.verified.cs similarity index 94% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#MinimalLambda.InvocationHandlers.g.verified.cs index e1fdb069..fbb9417b 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#MinimalLambda.InvocationHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.InvocationHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,7 +67,7 @@ Task InvocationDelegate(ILambdaInvocationContext context) } } } - + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#MinimalLambda.OnInitHandlers.g.verified.cs index 6fd56974..ee71efe8 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#MinimalLambda.OnInitHandlers.g.verified.cs index 644f8dfa..7fc5f95a 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -57,8 +53,9 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#MinimalLambda.OnInitHandlers.g.verified.cs index a932e538..ef5d9e04 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -57,8 +53,9 @@ async Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#MinimalLambda.OnInitHandlers.g.verified.cs index 6fd56974..ee71efe8 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 93% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#MinimalLambda.OnInitHandlers.g.verified.cs index 0d32cd15..d0a7c11c 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -94,8 +90,9 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput#LambdaHandler.g.verified.cs deleted file mode 100644 index f5d720e3..00000000 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput#LambdaHandler.g.verified.cs +++ /dev/null @@ -1,51 +0,0 @@ -//HintName: LambdaHandler.g.cs -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - -#nullable enable - -namespace System.Runtime.CompilerServices -{ - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} - -namespace MinimalLambda -{ - using System; - using System.Runtime.CompilerServices; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Extensions.DependencyInjection; - - file static class LambdaHostOnInitExtensions - { - // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "8qf/mQkfo0kVZbbuyagxebEAAABJbnB1dEZpbGUuY3M=")] - internal static ILambdaApplication OnInitInterceptor0( - this ILambdaApplication application, - Func> handler - ) - { - Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) - { - return handler(); - } - - return application.OnInit(OnInit); - } - } -} diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#MinimalLambda.OnInitHandlers.g.verified.cs index 83287fe8..a908e8ba 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#MinimalLambda.OnInitHandlers.g.verified.cs index 6fd56974..ee71efe8 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#MinimalLambda.OnInitHandlers.g.verified.cs index be631e6d..2008fc1a 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#MinimalLambda.OnInitHandlers.g.verified.cs index 7679f162..ba7192ad 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#MinimalLambda.OnInitHandlers.g.verified.cs index e8415e80..5cc78f87 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ async Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#MinimalLambda.OnInitHandlers.g.verified.cs index e8415e80..5cc78f87 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ async Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#MinimalLambda.OnInitHandlers.g.verified.cs index 6fd56974..ee71efe8 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -56,6 +52,7 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 90% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#MinimalLambda.OnInitHandlers.g.verified.cs index a017c4a9..ea739403 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -58,8 +54,9 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#MinimalLambda.OnInitHandlers.g.verified.cs index 048e53f4..38f3a37e 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -65,8 +61,9 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#MinimalLambda.OnInitHandlers.g.verified.cs similarity index 90% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#MinimalLambda.OnInitHandlers.g.verified.cs index 1a72ed5e..640024ff 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#MinimalLambda.OnInitHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnInitHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnInitBuilderExtensions + file static class GeneratedLambdaOnInitExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnInitBuilder OnInitInterceptor0( @@ -58,8 +54,9 @@ Task OnInit(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#MinimalLambda.OnShutdownHandlers.g.verified.cs index f38dc0c7..6fcb5800 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -56,6 +52,7 @@ Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 93% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#MinimalLambda.OnShutdownHandlers.g.verified.cs index c415e702..15cdcc23 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -94,8 +90,9 @@ Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#MinimalLambda.OnShutdownHandlers.g.verified.cs index a6fc02e7..01ecfff8 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -56,6 +52,7 @@ Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#MinimalLambda.OnShutdownHandlers.g.verified.cs index dfaf4dbe..8f9ad28e 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -56,6 +52,7 @@ Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#MinimalLambda.OnShutdownHandlers.g.verified.cs index 3d04c978..57e82890 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -55,6 +51,7 @@ async Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 89% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#MinimalLambda.OnShutdownHandlers.g.verified.cs index 3d04c978..57e82890 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -55,6 +51,7 @@ async Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 90% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#MinimalLambda.OnShutdownHandlers.g.verified.cs index 59200694..08b0696b 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -58,8 +54,9 @@ Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#MinimalLambda.OnShutdownHandlers.g.verified.cs index 06950c8e..6683d4f6 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -65,8 +61,9 @@ Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#MinimalLambda.OnShutdownHandlers.g.verified.cs similarity index 90% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#MinimalLambda.OnShutdownHandlers.g.verified.cs index 8c26aea1..b4bba1bc 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#MinimalLambda.OnShutdownHandlers.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.OnShutdownHandlers.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -37,7 +33,7 @@ namespace MinimalLambda.Generated using MinimalLambda.Builder; [global::System.CodeDom.Compiler.GeneratedCode("MinimalLambda.SourceGenerators", "REPLACED")] - file static class GeneratedLambdaOnShutdownBuilderExtensions + file static class GeneratedLambdaOnShutdownExtensions { [InterceptsLocation(1, "REPLACED")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( @@ -58,8 +54,9 @@ Task OnShutdown(ILambdaLifecycleContext context) } } } + file static class Utilities { internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_AbstractMiddleware#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_AbstractMiddleware#MinimalLambda.UseMiddleware.g.verified.cs similarity index 88% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_AbstractMiddleware#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_AbstractMiddleware#MinimalLambda.UseMiddleware.g.verified.cs index f244b32c..8096679b 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_AbstractMiddleware#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_AbstractMiddleware#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,9 +67,4 @@ private class MyLambdaMiddleware2Resolver0 } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ComplexRealWorldScenario#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ComplexRealWorldScenario#MinimalLambda.UseMiddleware.g.verified.cs similarity index 93% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ComplexRealWorldScenario#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ComplexRealWorldScenario#MinimalLambda.UseMiddleware.g.verified.cs index e57e42be..e3f5d552 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ComplexRealWorldScenario#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ComplexRealWorldScenario#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -118,9 +114,4 @@ private void BuildResolutionCache() } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ConstructorWithArgs#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ConstructorWithArgs#MinimalLambda.UseMiddleware.g.verified.cs similarity index 91% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ConstructorWithArgs#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ConstructorWithArgs#MinimalLambda.UseMiddleware.g.verified.cs index 259fd390..5e2af5df 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ConstructorWithArgs#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_ConstructorWithArgs#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -104,9 +100,4 @@ private void BuildResolutionCache() } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromArgumentsAttribute#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromArgumentsAttribute#MinimalLambda.UseMiddleware.g.verified.cs similarity index 91% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromArgumentsAttribute#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromArgumentsAttribute#MinimalLambda.UseMiddleware.g.verified.cs index c93faa51..3d443ff2 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromArgumentsAttribute#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromArgumentsAttribute#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -104,9 +100,4 @@ private void BuildResolutionCache() } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromKeyedServicesAttribute#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromKeyedServicesAttribute#MinimalLambda.UseMiddleware.g.verified.cs similarity index 88% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromKeyedServicesAttribute#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromKeyedServicesAttribute#MinimalLambda.UseMiddleware.g.verified.cs index adf3093e..f85c57ec 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromKeyedServicesAttribute#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromKeyedServicesAttribute#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -73,9 +69,4 @@ private class MyLambdaMiddlewareResolver0 } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromServicesAttribute#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromServicesAttribute#MinimalLambda.UseMiddleware.g.verified.cs similarity index 88% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromServicesAttribute#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromServicesAttribute#MinimalLambda.UseMiddleware.g.verified.cs index d2e6b09f..29bb7a44 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromServicesAttribute#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_FromServicesAttribute#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -73,9 +69,4 @@ private class MyLambdaMiddlewareResolver0 } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IAsyncDisposable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IAsyncDisposable#MinimalLambda.UseMiddleware.g.verified.cs similarity index 88% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IAsyncDisposable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IAsyncDisposable#MinimalLambda.UseMiddleware.g.verified.cs index f0719af3..ff57cab7 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IAsyncDisposable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IAsyncDisposable#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -72,9 +68,4 @@ private class MyLambdaMiddlewareResolver0 } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IDisposable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IDisposable#MinimalLambda.UseMiddleware.g.verified.cs similarity index 88% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IDisposable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IDisposable#MinimalLambda.UseMiddleware.g.verified.cs index 3b0c8cf5..0bf9a8b6 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IDisposable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_IDisposable#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -72,9 +68,4 @@ private class MyLambdaMiddlewareResolver0 } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MixedParameterSources#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MixedParameterSources#MinimalLambda.UseMiddleware.g.verified.cs similarity index 93% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MixedParameterSources#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MixedParameterSources#MinimalLambda.UseMiddleware.g.verified.cs index 7eef3be6..4e6ca707 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MixedParameterSources#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MixedParameterSources#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -118,9 +114,4 @@ private void BuildResolutionCache() } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_Simple#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MultipleConstructorsAndOneWithMiddlewareConstructor#MinimalLambda.UseMiddleware.g.verified.cs similarity index 88% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_Simple#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MultipleConstructorsAndOneWithMiddlewareConstructor#MinimalLambda.UseMiddleware.g.verified.cs index 403974bd..36a1b476 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_Simple#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MultipleConstructorsAndOneWithMiddlewareConstructor#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,9 +67,4 @@ private class MyLambdaMiddlewareResolver0 } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_NullableParameter#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_NullableParameter#MinimalLambda.UseMiddleware.g.verified.cs similarity index 91% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_NullableParameter#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_NullableParameter#MinimalLambda.UseMiddleware.g.verified.cs index cae4cafc..06fa8369 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_NullableParameter#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_NullableParameter#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -104,9 +100,4 @@ private void BuildResolutionCache() } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_OptionalParameterWithDefaultValue#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_OptionalParameterWithDefaultValue#MinimalLambda.UseMiddleware.g.verified.cs similarity index 91% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_OptionalParameterWithDefaultValue#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_OptionalParameterWithDefaultValue#MinimalLambda.UseMiddleware.g.verified.cs index 1bd48759..ccadab29 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_OptionalParameterWithDefaultValue#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_OptionalParameterWithDefaultValue#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -104,9 +100,4 @@ private void BuildResolutionCache() } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MultipleConstructorsAndOneWithMiddlewareConstructor#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_Simple#MinimalLambda.UseMiddleware.g.verified.cs similarity index 88% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MultipleConstructorsAndOneWithMiddlewareConstructor#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_Simple#MinimalLambda.UseMiddleware.g.verified.cs index 403974bd..36a1b476 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_MultipleConstructorsAndOneWithMiddlewareConstructor#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_Simple#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -71,9 +67,4 @@ private class MyLambdaMiddlewareResolver0 } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file diff --git a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_WithArgsArray#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_WithArgsArray#MinimalLambda.UseMiddleware.g.verified.cs similarity index 92% rename from tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_WithArgsArray#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_WithArgsArray#MinimalLambda.UseMiddleware.g.verified.cs index 960c6d7e..4407166f 100644 --- a/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_WithArgsArray#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/UseMiddlewareTVerifyTests.Test_MiddlewareClass_WithArgsArray#MinimalLambda.UseMiddleware.g.verified.cs @@ -1,4 +1,4 @@ -//HintName: LambdaHandler.g.cs +//HintName: MinimalLambda.UseMiddleware.g.cs //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -8,8 +8,6 @@ // //------------------------------------------------------------------------------ -#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously - #nullable enable namespace System.Runtime.CompilerServices @@ -20,9 +18,7 @@ namespace System.Runtime.CompilerServices [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { - public InterceptsLocationAttribute(int version, string data) - { - } + public InterceptsLocationAttribute(int version, string data) { } } } @@ -114,9 +110,4 @@ private void BuildResolutionCache() } } } - - file static class Utilities - { - internal static T Cast(Delegate d, T _) where T : Delegate => (T)d; - } -} +} \ No newline at end of file