diff --git a/.github/workflows/main-build.yaml b/.github/workflows/main-build.yaml index 43364d8c..d3b1fe17 100644 --- a/.github/workflows/main-build.yaml +++ b/.github/workflows/main-build.yaml @@ -73,9 +73,9 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | ~/.sonar/scanner/dotnet-sonarscanner begin \ - /k:"j-d-ha_aws-lambda-host" \ + /k:"j-d-ha_minimal-lambda" \ /o:"j-d-ha" \ - /d:sonar.exclusions="**/bin/**,**/obj/**,tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/**,**/coverage/**,**/.nuget/**,**/packages/**" \ + /d:sonar.exclusions="**/bin/**,**/obj/**,tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/**,**/coverage/**,**/.nuget/**,**/packages/**" \ /d:sonar.coverage.exclusions="**/*" \ /d:sonar.token="$SONAR_TOKEN" dotnet build --no-restore --configuration Release /p:TreatWarningsAsErrors=true diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index cd77cce8..7188ff70 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -97,9 +97,9 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: | ~/.sonar/scanner/dotnet-sonarscanner begin \ - /k:"j-d-ha_aws-lambda-host" \ + /k:"j-d-ha_minimal-lambda" \ /o:"j-d-ha" \ - /d:sonar.exclusions="**/bin/**,**/obj/**,tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/**,**/coverage/**,**/.nuget/**,**/packages/**" \ + /d:sonar.exclusions="**/bin/**,**/obj/**,tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/**,**/coverage/**,**/.nuget/**,**/packages/**" \ /d:sonar.coverage.exclusions="**/*" \ /d:sonar.token="$SONAR_TOKEN" diff --git a/.gitignore b/.gitignore index 9bf17d8e..b22c2a4b 100644 --- a/.gitignore +++ b/.gitignore @@ -69,13 +69,13 @@ nunit-*.xml /docs/claude/** # temp files used for dev -**/Temp*.cs -**/Temp*/ +**/Temp.cs +**/Temp/ **/*.env **/node_modules/ -/benchmarks/AwsLambda.Host.Benchmarks/BenchmarkDotNet.Artifacts/ +/benchmarks/MinimalLambda.Benchmarks/BenchmarkDotNet.Artifacts/ /nupkg/ /temp.md /.claude/ diff --git a/.grenrc.js b/.grenrc.js index 80540865..c65cc59f 100644 --- a/.grenrc.js +++ b/.grenrc.js @@ -19,15 +19,15 @@ ${variables.body} ## Packages All 3 packages are included in this release: -- \`AwsLambda.Host\` -- \`AwsLambda.Host.Abstractions\` -- \`AwsLambda.Host.OpenTelemetry\` +- \`MinimalLambda\` +- \`MinimalLambda.Abstractions\` +- \`MinimalLambda.OpenTelemetry\` -These packages have been automatically published to [NuGet.org](https://www.nuget.org/packages?q=AwsLambda.Host). +These packages have been automatically published to [NuGet.org](https://www.nuget.org/packages?q=MinimalLambda). --- -**Full Changelog:** [\`${variables.previousTag}...${variables.currentTag}\`](https://github.com/j-d-ha/aws-lambda-host/compare/${variables.previousTag}...${variables.currentTag}) +**Full Changelog:** [\`${variables.previousTag}...${variables.currentTag}\`](https://github.com/j-d-ha/minimal-lambda/compare/${variables.previousTag}...${variables.currentTag}) `; }, group: (variables) => { diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ffe12b9..d27ec1fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [Unreleased](https://github.com/j-d-ha/aws-lambda-host/compare/v1.3.1...HEAD) +## [Unreleased](https://github.com/j-d-ha/minimal-lambda/compare/v1.3.1...HEAD) -## [v1.3.1](https://github.com/j-d-ha/aws-lambda-host/compare/v1.3.0...v1.3.1) - 2025-12-10 +## [v1.3.1](https://github.com/j-d-ha/minimal-lambda/compare/v1.3.0...v1.3.1) - 2025-12-10 ### πŸ› Bug Fixes * fix(core): add missing TenantId and TraceId properties to DefaultLambdaHostContext (#224) @j-d-ha * fix(ci): remove sign-commits from changelog workflow (#223) @j-d-ha -## [v1.3.0](https://github.com/j-d-ha/aws-lambda-host/compare/v1.2.1...v1.3.0) - 2025-12-10 +## [v1.3.0](https://github.com/j-d-ha/minimal-lambda/compare/v1.2.1...v1.3.0) - 2025-12-10 ## πŸš€ Features @@ -36,7 +36,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * ci(github): optimize workflow triggers for draft PRs (#215) @j-d-ha -## [v1.2.1](https://github.com/j-d-ha/aws-lambda-host/compare/v1.2.0...v1.2.1) - 2025-11-30 +## [v1.2.1](https://github.com/j-d-ha/minimal-lambda/compare/v1.2.0...v1.2.1) - 2025-11-30 ## πŸ› Bug Fixes @@ -53,7 +53,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * ci: skip build workflows for docs-only changes (#204) @j-d-ha * chore(github): enhance changelog update workflow (#201) @j-d-ha -## [v1.2.0](https://github.com/j-d-ha/aws-lambda-host/compare/v1.1.0...v1.2.0) - 2025-11-29 +## [v1.2.0](https://github.com/j-d-ha/minimal-lambda/compare/v1.1.0...v1.2.0) - 2025-11-29 ## πŸš€ Features @@ -83,7 +83,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * chore: cleanup repository formatting and documentation (#197) @j-d-ha * chore(ci): pinned release-drafter action to 6.0.0 (#182) @j-d-ha -## [v1.1.0](https://github.com/j-d-ha/aws-lambda-host/compare/v1.0.0...v1.1.0) - 2025-11-27 +## [v1.1.0](https://github.com/j-d-ha/minimal-lambda/compare/v1.0.0...v1.1.0) - 2025-11-27 ## πŸš€ Features @@ -104,7 +104,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * chore(github): update changelog for v1.0.0 release (#170) @j-d-ha -## [v1.0.0](https://github.com/j-d-ha/aws-lambda-host/compare/v0.1.3...v1.0.0) - 2025-11-24 +## [v1.0.0](https://github.com/j-d-ha/minimal-lambda/compare/v0.1.3...v1.0.0) - 2025-11-24 ## πŸš€ Features @@ -155,19 +155,19 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * refactor(host): reorganize folder structure with hierarchical layers (#146) @j-d-ha * feat(envelopes): add modular envelope system for Lambda event handling (#131) @j-d-ha -## [v0.1.3](https://github.com/j-d-ha/aws-lambda-host/compare/v0.1.2...v0.1.3) - 2025-11-10 +## [v0.1.3](https://github.com/j-d-ha/minimal-lambda/compare/v0.1.2...v0.1.3) - 2025-11-10 ### πŸ› Bug Fixes * fix: prevent example projects from being packed during release (#115) @j-d-ha -## [v0.1.2](https://github.com/j-d-ha/aws-lambda-host/compare/v0.1.1...v0.1.2) - 2025-11-10 +## [v0.1.2](https://github.com/j-d-ha/minimal-lambda/compare/v0.1.1...v0.1.2) - 2025-11-10 ### πŸ”§ Maintenance * ci(github): get NuGet package version from release tag (#113) @j-d-ha -## [v0.1.1](https://github.com/j-d-ha/aws-lambda-host/compare/v0.1.1) - 2025-11-09 +## [v0.1.1](https://github.com/j-d-ha/minimal-lambda/compare/v0.1.1) - 2025-11-09 ### πŸ”§ Maintenance diff --git a/CLAUDE.md b/CLAUDE.md index c526c876..5c304134 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,8 +2,8 @@ ## GENERAL -- Repo link: https://github.com/j-d-ha/aws-lambda-host -- GitHub Project Name: Lambda.Host Development +- Repo link: https://github.com/j-d-ha/minimal-lambda +- GitHub Project Name: MinimalLambda Development - All code in this project is designed to run on AWS Lambda or generate code that will then be run on AWS Lambda. - When writing PRs, ALWAYS use `./.github/pull_request_template.md` as the template for the PR. @@ -193,9 +193,9 @@ messages): All 3 packages are versioned synchronously: -- `AwsLambda.Host` -- `AwsLambda.Host.Abstractions` -- `AwsLambda.Host.OpenTelemetry` +- `MinimalLambda` +- `MinimalLambda.Abstractions` +- `MinimalLambda.OpenTelemetry` Versions are stored in `/Directory.Build.props` as ``. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 791b926c..a5021eb3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,11 @@ -# Contributing to AWS Lambda Host +# Contributing to MinimalLambda -Thank you for your interest in contributing to the AWS Lambda Host project! This document provides guidelines and instructions for contributing. +Thank you for your interest in contributing to the MinimalLambda project! This document provides guidelines and instructions for contributing. ## Table of Contents -* [Contributing to AWS Lambda Host](#contributing-to-aws-lambda-host) +* [Contributing to MinimalLambda](#contributing-to-minimal-lambda) * [Table of Contents](#table-of-contents) * [Code of Conduct](#code-of-conduct) * [Getting Started](#getting-started) @@ -33,12 +33,12 @@ We are committed to providing a welcoming and inclusive environment for all cont 1. **Fork the repository** on GitHub 2. **Clone your fork** locally: ```bash - git clone https://github.com/YOUR_USERNAME/aws-lambda-host.git - cd aws-lambda-host + git clone https://github.com/YOUR_USERNAME/minimal-lambda.git + cd minimal-lambda ``` 3. **Add the upstream remote**: ```bash - git remote add upstream https://github.com/j-d-ha/aws-lambda-host.git + git remote add upstream https://github.com/j-d-ha/minimal-lambda.git ``` 4. **Create a feature branch** (see [Branching Strategy](#branching-strategy)) @@ -80,7 +80,7 @@ The project uses two complementary tools: 1. **CleanupCode**: JetBrains code cleanup tool - Applies code organization and style rules - - Uses the "Built-in: Full Cleanup" profile configured in `AwsLambda.Host.sln.DotSettings` + - Uses the "Built-in: Full Cleanup" profile configured in `MinimalLambda.sln.DotSettings` - Handles code structure and consistency 2. **CSharpier**: Opinionated C# code formatter @@ -115,7 +115,7 @@ fail, as the GitHub Actions workflow (`pr-build.yaml`) includes a code quality c If you're using **JetBrains Rider** or **Visual Studio** with ReSharper: -- The solution includes `AwsLambda.Host.sln.DotSettings` with formatting rules +- The solution includes `MinimalLambda.sln.DotSettings` with formatting rules - Format on save can be configured in your IDE settings - This ensures consistency even before running Task commands @@ -212,7 +212,7 @@ when using extension method syntax. ### C# Conventions - **Indentation**: 4 spaces -- **File-scoped namespaces**: Use `namespace AwsLambda.Host;` format +- **File-scoped namespaces**: Use `namespace MinimalLambda;` format - **Nullable reference types**: Always enabled (`enable`) - **Modern syntax**: Use records, top-level statements, and nullable annotations where appropriate - **Line length**: Keep to 100 characters when practical @@ -288,7 +288,7 @@ public class LambdaApplicationTest dotnet test # Run tests for specific project -dotnet test tests/AwsLambda.Host.UnitTests +dotnet test tests/MinimalLambda.UnitTests # Run with verbose output dotnet test --verbosity detailed @@ -372,4 +372,4 @@ By contributing to this project, you agree that your contributions will be licen --- -**Thank you for contributing to AWS Lambda Host!** πŸš€ +**Thank you for contributing to MinimalLambda!** πŸš€ diff --git a/Directory.Build.props b/Directory.Build.props index cd8ac324..d14fc670 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,14 +1,14 @@ - 1.2.1-beta.2 + 2.0.0-beta.1 MIT Jonas Ha csharp;library;utility;aws;lambda - https://github.com/j-d-ha/aws-lambda-host + https://github.com/j-d-ha/minimal-lambda Copyright Β© 2025 Jonas Ha - https://github.com/j-d-ha/aws-lambda-host + https://github.com/j-d-ha/minimal-lambda false true diff --git a/AwsLambda.Host.sln b/MinimalLambda.sln similarity index 83% rename from AwsLambda.Host.sln rename to MinimalLambda.sln index d0bf4f62..cd134e3f 100644 --- a/AwsLambda.Host.sln +++ b/MinimalLambda.sln @@ -2,11 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{B36A84DF-456D-A817-6EDD-3EC3E7F6E11F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Example.HelloWorldAot", "examples\AwsLambda.Host.Example.HelloWorldAot\AwsLambda.Host.Example.HelloWorldAot.csproj", "{6B8CD8FF-832E-9F88-FB36-2173461F6678}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Example.HelloWorldAot", "examples\MinimalLambda.Example.HelloWorldAot\MinimalLambda.Example.HelloWorldAot.csproj", "{6B8CD8FF-832E-9F88-FB36-2173461F6678}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Example.HelloWorld", "examples\AwsLambda.Host.Example.HelloWorld\AwsLambda.Host.Example.HelloWorld.csproj", "{C055F84D-F8B7-DBCF-8A73-2EA183185033}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Example.HelloWorld", "examples\MinimalLambda.Example.HelloWorld\MinimalLambda.Example.HelloWorld.csproj", "{C055F84D-F8B7-DBCF-8A73-2EA183185033}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Example.Lifecycle", "examples\AwsLambda.Host.Example.Lifecycle\AwsLambda.Host.Example.Lifecycle.csproj", "{0840D364-A48A-99D7-EE47-1CAC4643B29A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Example.Lifecycle", "examples\MinimalLambda.Example.Lifecycle\MinimalLambda.Example.Lifecycle.csproj", "{0840D364-A48A-99D7-EE47-1CAC4643B29A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{089100B1-113F-4E66-888A-E83F3999EAFD}" ProjectSection(SolutionItems) = preProject @@ -24,55 +24,52 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Abstractions", "src\AwsLambda.Host.Abstractions\AwsLambda.Host.Abstractions.csproj", "{BA42EF68-C2E6-392F-8B5A-37D2EB4A7C06}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Abstractions", "src\MinimalLambda.Abstractions\MinimalLambda.Abstractions.csproj", "{BA42EF68-C2E6-392F-8B5A-37D2EB4A7C06}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.OpenTelemetry", "src\AwsLambda.Host.OpenTelemetry\AwsLambda.Host.OpenTelemetry.csproj", "{6F7F539B-6D80-175E-8200-7B1E64323541}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.OpenTelemetry", "src\MinimalLambda.OpenTelemetry\MinimalLambda.OpenTelemetry.csproj", "{6F7F539B-6D80-175E-8200-7B1E64323541}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.SourceGenerators", "src\AwsLambda.Host.SourceGenerators\AwsLambda.Host.SourceGenerators.csproj", "{2CCDEC5D-5A84-2F11-A2F9-A6AF00F2112D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.SourceGenerators", "src\MinimalLambda.SourceGenerators\MinimalLambda.SourceGenerators.csproj", "{2CCDEC5D-5A84-2F11-A2F9-A6AF00F2112D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host", "src\AwsLambda.Host\AwsLambda.Host.csproj", "{6C9DE6F5-2E44-A1BE-0E21-D39850C45EF3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda", "src\MinimalLambda\MinimalLambda.csproj", "{6C9DE6F5-2E44-A1BE-0E21-D39850C45EF3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.SourceGenerators.UnitTests", "tests\AwsLambda.Host.SourceGenerators.UnitTests\AwsLambda.Host.SourceGenerators.UnitTests.csproj", "{00F4BB08-2770-56A6-1F85-B916CA14340E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.SourceGenerators.UnitTests", "tests\MinimalLambda.SourceGenerators.UnitTests\MinimalLambda.SourceGenerators.UnitTests.csproj", "{00F4BB08-2770-56A6-1F85-B916CA14340E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.UnitTests", "tests\AwsLambda.Host.UnitTests\AwsLambda.Host.UnitTests.csproj", "{5A3B3343-1E90-46DB-DD4C-DB87FD583D69}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.UnitTests", "tests\MinimalLambda.UnitTests\MinimalLambda.UnitTests.csproj", "{5A3B3343-1E90-46DB-DD4C-DB87FD583D69}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Example.OpenTelemetry", "examples\AwsLambda.Host.Example.OpenTelemetry\AwsLambda.Host.Example.OpenTelemetry.csproj", "{BA5B805C-0187-4D3D-9F3F-297314F64B5B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Example.OpenTelemetry", "examples\MinimalLambda.Example.OpenTelemetry\MinimalLambda.Example.OpenTelemetry.csproj", "{BA5B805C-0187-4D3D-9F3F-297314F64B5B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Example.Events", "examples\AwsLambda.Host.Example.Events\AwsLambda.Host.Example.Events.csproj", "{BA1CA0FB-A0C8-429B-9709-EDEEA4C187B9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Example.Events", "examples\MinimalLambda.Example.Events\MinimalLambda.Example.Events.csproj", "{BA1CA0FB-A0C8-429B-9709-EDEEA4C187B9}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Envelopes", "Envelopes", "{1C3C52D9-2936-4A0C-A9C8-F330F22B8359}" ProjectSection(SolutionItems) = preProject src\Envelopes\README.md = src\Envelopes\README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.Sqs", "src\Envelopes\AwsLambda.Host.Envelopes.Sqs\AwsLambda.Host.Envelopes.Sqs.csproj", "{8E3037D3-BEB0-4A0B-A09A-CF31F50D0508}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.Sqs", "src\Envelopes\MinimalLambda.Envelopes.Sqs\MinimalLambda.Envelopes.Sqs.csproj", "{8E3037D3-BEB0-4A0B-A09A-CF31F50D0508}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.ApiGateway", "src\Envelopes\AwsLambda.Host.Envelopes.ApiGateway\AwsLambda.Host.Envelopes.ApiGateway.csproj", "{83E4EBD0-EE1C-422D-A22C-BC6A1895A879}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.ApiGateway", "src\Envelopes\MinimalLambda.Envelopes.ApiGateway\MinimalLambda.Envelopes.ApiGateway.csproj", "{83E4EBD0-EE1C-422D-A22C-BC6A1895A879}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.UnitTests", "tests\AwsLambda.Host.Envelopes.UnitTests\AwsLambda.Host.Envelopes.UnitTests.csproj", "{0BBBEF49-6478-4394-9BD7-B9AFCA280B3D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.UnitTests", "tests\MinimalLambda.Envelopes.UnitTests\MinimalLambda.Envelopes.UnitTests.csproj", "{0BBBEF49-6478-4394-9BD7-B9AFCA280B3D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.OpenTelemetry.UnitTests", "tests\AwsLambda.Host.OpenTelemetry.UnitTests\AwsLambda.Host.OpenTelemetry.UnitTests.csproj", "{B8FD7488-07A9-4CA0-8F40-483ECE109159}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.OpenTelemetry.UnitTests", "tests\MinimalLambda.OpenTelemetry.UnitTests\MinimalLambda.OpenTelemetry.UnitTests.csproj", "{B8FD7488-07A9-4CA0-8F40-483ECE109159}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Benchmarks", "benchmarks\AwsLambda.Host.Benchmarks\AwsLambda.Host.Benchmarks.csproj", "{C3E6B18E-A30A-4844-BB82-209A6CC52205}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Benchmarks", "benchmarks\MinimalLambda.Benchmarks\MinimalLambda.Benchmarks.csproj", "{C3E6B18E-A30A-4844-BB82-209A6CC52205}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{A193E0DE-D617-4E7E-83CA-2A9150E44841}" - ProjectSection(SolutionItems) = preProject - Properties\launchSettings.json = Properties\launchSettings.json - EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.Alb", "src\Envelopes\AwsLambda.Host.Envelopes.Alb\AwsLambda.Host.Envelopes.Alb.csproj", "{DD02E50C-625B-4A91-9BDF-7E3C08DF9E78}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.Alb", "src\Envelopes\MinimalLambda.Envelopes.Alb\MinimalLambda.Envelopes.Alb.csproj", "{DD02E50C-625B-4A91-9BDF-7E3C08DF9E78}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.Sns", "src\Envelopes\AwsLambda.Host.Envelopes.Sns\AwsLambda.Host.Envelopes.Sns.csproj", "{3F7CDB17-2492-4670-930C-E87DD96A7BB9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.Sns", "src\Envelopes\MinimalLambda.Envelopes.Sns\MinimalLambda.Envelopes.Sns.csproj", "{3F7CDB17-2492-4670-930C-E87DD96A7BB9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.Kinesis", "src\Envelopes\AwsLambda.Host.Envelopes.Kinesis\AwsLambda.Host.Envelopes.Kinesis.csproj", "{4A29DBDB-F707-419D-9024-B0B509A415DD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.Kinesis", "src\Envelopes\MinimalLambda.Envelopes.Kinesis\MinimalLambda.Envelopes.Kinesis.csproj", "{4A29DBDB-F707-419D-9024-B0B509A415DD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.KinesisFirehose", "src\Envelopes\AwsLambda.Host.Envelopes.KinesisFirehose\AwsLambda.Host.Envelopes.KinesisFirehose.csproj", "{71EB7C3D-6EFE-4189-BE50-DC7C83D666F5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.KinesisFirehose", "src\Envelopes\MinimalLambda.Envelopes.KinesisFirehose\MinimalLambda.Envelopes.KinesisFirehose.csproj", "{71EB7C3D-6EFE-4189-BE50-DC7C83D666F5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.Kafka", "src\Envelopes\AwsLambda.Host.Envelopes.Kafka\AwsLambda.Host.Envelopes.Kafka.csproj", "{DA647025-1B7B-425A-9405-8E015F6DA723}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.Kafka", "src\Envelopes\MinimalLambda.Envelopes.Kafka\MinimalLambda.Envelopes.Kafka.csproj", "{DA647025-1B7B-425A-9405-8E015F6DA723}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AwsLambda.Host.Envelopes.CloudWatchLogs", "src\Envelopes\AwsLambda.Host.Envelopes.CloudWatchLogs\AwsLambda.Host.Envelopes.CloudWatchLogs.csproj", "{6D40345B-6CCF-4A6C-8FA2-5BE6C693E3F7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinimalLambda.Envelopes.CloudWatchLogs", "src\Envelopes\MinimalLambda.Envelopes.CloudWatchLogs\MinimalLambda.Envelopes.CloudWatchLogs.csproj", "{6D40345B-6CCF-4A6C-8FA2-5BE6C693E3F7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/AwsLambda.Host.sln.DotSettings b/MinimalLambda.sln.DotSettings similarity index 100% rename from AwsLambda.Host.sln.DotSettings rename to MinimalLambda.sln.DotSettings diff --git a/README.md b/README.md index 7feed6a4..3f9ab583 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,54 @@ -# AwsLambda.Host +# MinimalLambda -[![Main Build](https://github.com/j-d-ha/aws-lambda-host/actions/workflows/main-build.yaml/badge.svg)](https://github.com/j-d-ha/aws-lambda-host/actions/workflows/main-build.yaml) -[![codecov](https://codecov.io/gh/j-d-ha/aws-lambda-host/graph/badge.svg?token=BWORPTQ0UK)](https://codecov.io/gh/j-d-ha/aws-lambda-host) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=j-d-ha_aws-lambda-host&metric=alert_status&token=9fb519975d91379dcfbc6c13a4bd4207131af6e3)](https://sonarcloud.io/summary/new_code?id=j-d-ha_aws-lambda-host) +[![Main Build](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml/badge.svg)](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml) +[![codecov](https://codecov.io/gh/j-d-ha/minimal-lambda/graph/badge.svg?token=BWORPTQ0UK)](https://codecov.io/gh/j-d-ha/minimal-lambda) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=j-d-ha_minimal-lambda&metric=alert_status&token=9fb519975d91379dcfbc6c13a4bd4207131af6e3)](https://sonarcloud.io/summary/new_code?id=j-d-ha_minimal-lambda) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) -A modern .NET framework for building AWS Lambda functions using familiar .NET patterns. +**ASP.NET Core-style patterns for AWS Lambda** – Build Lambda functions (for any trigger) using the same clean, declarative patterns as ASP.NET Core Minimal APIs. -> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/aws-lambda-host/)** +> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)** ## Overview -**aws-lambda-host** is a .NET hosting framework that simplifies AWS Lambda development by following -idiomatic .NET patterns and best practices. Instead of writing boilerplate code to handle Lambda -events, context, and serialization, you get a clean, declarative API for defining Lambda handlers -with dependency injection (similar to minimal APIs), middleware support, and modern async/await -patterns. Built on the generic host from Microsoft.Extensions, it provides a .NET hosting experience -similar to ASP.NET Core but tailored specifically for Lambda. +**If you know ASP.NET Core Minimal APIs, you already know MinimalLambda.** + +MinimalLambda brings the clean, declarative coding style of ASP.NET Core Minimal APIs to AWS Lambda – for **any trigger type** (SQS, SNS, API Gateway, Kinesis, S3, EventBridge, and more): + +- **Same builder pattern**: `LambdaApplication.CreateBuilder()` β†’ `Build()` β†’ `RunAsync()` +- **Same dependency injection**: `builder.Services.AddScoped()` +- **Same handler mapping**: `lambda.MapHandler(...)` just like `app.MapGet(...)` +- **Same middleware pipeline**: `lambda.Use(...)` for cross-cutting concerns +- **Same foundation**: Built on `Microsoft.Extensions.Hosting` like ASP.NET Core + +Instead of writing boilerplate Lambda handlers, you get familiar .NET patterns with automatic dependency injection, proper scoped lifetimes, middleware support, and compile-time code generation for zero reflection overhead. ## Key Features -- **.NET Hosting Patterns** – Use middleware, builder pattern, and dependency injection (similar to - ASP.NET Core), with proper scoped lifetime management per invocation -- **Async-First Design** – Native support for async/await with proper Lambda timeout and - cancellation handling -- **Source Generators & Interceptors** – Compile-time code generation and method interception for - optimal performance -- **AOT Ready** – Support for Ahead-of-Time compilation for faster cold starts -- **Built-in Observability** – OpenTelemetry integration for distributed tracing -- **Flexible Handler Registration** – Simple, declarative API for mapping Lambda event types to - handlers -- **Minimal Runtime Overhead** – No unnecessary abstractions; efficient use of Lambda resources +- **Minimal API Pattern** – Map handlers with `lambda.MapHandler(...)` just like `app.MapGet()` in ASP.NET Core – clean, declarative, and intuitive +- **Dependency Injection** – Constructor and parameter injection using `Microsoft.Extensions.DependencyInjection` with proper scoped lifetimes per invocation +- **Middleware Pipeline** – Familiar `Use()` pattern for cross-cutting concerns like logging, validation, and error handling +- **Source Generated** – Compile-time code generation for zero reflection overhead and optimal performance +- **AOT Ready** – Native AOT compilation support for sub-100ms cold starts +- **Built-in Observability** – OpenTelemetry integration for distributed tracing and metrics +- **Type-Safe Envelopes** – Strongly-typed event wrappers for SQS, SNS, API Gateway, Kinesis, and more +- **Minimal Runtime Overhead** – Lightweight abstraction layer built on the same foundation as ASP.NET Core + +## From ASP.NET Core to Lambda + +If you're familiar with ASP.NET Core Minimal APIs, the transition to MinimalLambda is seamless: + +| ASP.NET Core Minimal API | MinimalLambda | +|---|---| +| `WebApplication.CreateBuilder()` | `LambdaApplication.CreateBuilder()` | +| `app.MapGet("/hello", ...)` | `lambda.MapHandler(...)` | +| `builder.Services.AddScoped()` | `builder.Services.AddScoped()` | +| `app.UseMiddleware()` | `lambda.UseMiddleware()` | +| `app.RunAsync()` | `lambda.RunAsync()` | +| `HttpContext` dependency injection | `ILambdaContext` dependency injection | +| Route parameters | `[Event]` attribute for event binding | + +The patterns are intentionally identical – if you know one, you know the other. ## Packages @@ -41,11 +59,11 @@ The framework is divided into multiple NuGet packages: The core packages provide the fundamental hosting framework, abstractions, and observability support for building AWS Lambda functions. -| Package | NuGet | Downloads | -|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](./src/AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](./src/AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](./src/AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | +| Package | NuGet | Downloads | +|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| +| [**MinimalLambda**](./src/MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](./src/MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](./src/MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | ### Envelopes Packages @@ -54,14 +72,14 @@ including SQS, SNS, API Gateway, Kinesis, and more. | Package | NuGet | Downloads | |------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host.Envelopes.Sqs**](./AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](./AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](./AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](./AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](./AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](./AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](./AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](./AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda.Envelopes.Sqs**](./MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](./MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](./MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](./MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](./MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](./MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](./MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](./MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | Each package has detailed documentation in its own README file. @@ -70,13 +88,13 @@ Each package has detailed documentation in its own README file. Install the NuGet package: ```bash -dotnet add package AwsLambda.Host +dotnet add package MinimalLambda ``` Create a simple Lambda handler with dependency injection: ```csharp -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -109,10 +127,10 @@ OpenTelemetry integration. ## Documentation -- [AwsLambda.Host](./src/AwsLambda.Host/README.md) – Core framework documentation -- [AwsLambda.Host.Abstractions](./src/AwsLambda.Host.Abstractions/README.md) – Interfaces and +- [MinimalLambda](./src/MinimalLambda/README.md) – Core framework documentation +- [MinimalLambda.Abstractions](./src/MinimalLambda.Abstractions/README.md) – Interfaces and abstractions -- [AwsLambda.Host.OpenTelemetry](./src/AwsLambda.Host.OpenTelemetry/README.md) – Observability +- [MinimalLambda.OpenTelemetry](./src/MinimalLambda.OpenTelemetry/README.md) – Observability documentation - [Examples](./examples/) – Sample Lambda functions demonstrating framework features diff --git a/benchmarks/AwsLambda.Host.Benchmarks/BenchmarkConfig.cs b/benchmarks/MinimalLambda.Benchmarks/BenchmarkConfig.cs similarity index 68% rename from benchmarks/AwsLambda.Host.Benchmarks/BenchmarkConfig.cs rename to benchmarks/MinimalLambda.Benchmarks/BenchmarkConfig.cs index 3aa45875..f5cc32a4 100644 --- a/benchmarks/AwsLambda.Host.Benchmarks/BenchmarkConfig.cs +++ b/benchmarks/MinimalLambda.Benchmarks/BenchmarkConfig.cs @@ -1,5 +1,5 @@ using BenchmarkDotNet.Configs; -namespace AwsLambda.Host.Benchmarks; +namespace MinimalLambda.Benchmarks; public class BenchmarkConfig : ManualConfig { } diff --git a/benchmarks/AwsLambda.Host.Benchmarks/Benchmarks.cs b/benchmarks/MinimalLambda.Benchmarks/Benchmarks.cs similarity index 73% rename from benchmarks/AwsLambda.Host.Benchmarks/Benchmarks.cs rename to benchmarks/MinimalLambda.Benchmarks/Benchmarks.cs index ab5134f1..b1115410 100644 --- a/benchmarks/AwsLambda.Host.Benchmarks/Benchmarks.cs +++ b/benchmarks/MinimalLambda.Benchmarks/Benchmarks.cs @@ -1,7 +1,7 @@ -ο»Ώusing AwsLambda.Host.Builder; -using BenchmarkDotNet.Attributes; +ο»Ώusing BenchmarkDotNet.Attributes; +using MinimalLambda.Builder; -namespace AwsLambda.Host.Benchmarks; +namespace MinimalLambda.Benchmarks; public class CreateBuilderBenchmarks { diff --git a/benchmarks/AwsLambda.Host.Benchmarks/AwsLambda.Host.Benchmarks.csproj b/benchmarks/MinimalLambda.Benchmarks/MinimalLambda.Benchmarks.csproj similarity index 89% rename from benchmarks/AwsLambda.Host.Benchmarks/AwsLambda.Host.Benchmarks.csproj rename to benchmarks/MinimalLambda.Benchmarks/MinimalLambda.Benchmarks.csproj index a78e2993..3605ebdf 100644 --- a/benchmarks/AwsLambda.Host.Benchmarks/AwsLambda.Host.Benchmarks.csproj +++ b/benchmarks/MinimalLambda.Benchmarks/MinimalLambda.Benchmarks.csproj @@ -19,6 +19,6 @@ - + diff --git a/benchmarks/AwsLambda.Host.Benchmarks/Program.cs b/benchmarks/MinimalLambda.Benchmarks/Program.cs similarity index 89% rename from benchmarks/AwsLambda.Host.Benchmarks/Program.cs rename to benchmarks/MinimalLambda.Benchmarks/Program.cs index 02f46aca..784d7f94 100644 --- a/benchmarks/AwsLambda.Host.Benchmarks/Program.cs +++ b/benchmarks/MinimalLambda.Benchmarks/Program.cs @@ -1,6 +1,6 @@ -using AwsLambda.Host.Benchmarks; using BenchmarkDotNet.Configs; using BenchmarkDotNet.Running; +using MinimalLambda.Benchmarks; var config = DefaultConfig.Instance; diff --git a/docs/advanced/index.md b/docs/advanced/index.md index 9ec02e9e..d19c438c 100644 --- a/docs/advanced/index.md +++ b/docs/advanced/index.md @@ -1,5 +1,5 @@ # Advanced Topics -> Coming soon: guidance on Native AOT, source generator internals, and performance tuning for `AwsLambda.Host`. +> Coming soon: guidance on Native AOT, source generator internals, and performance tuning for `MinimalLambda`. We're working on detailed content for advanced scenarios. In the meantime, follow the repository's CHANGELOG and GitHub discussions for early tips. diff --git a/docs/features/envelopes.md b/docs/features/envelopes.md index d44b9528..4ecbed5b 100644 --- a/docs/features/envelopes.md +++ b/docs/features/envelopes.md @@ -5,7 +5,7 @@ strongly typed payload accessors. Instead of deserializing JSON manually, you wo `BodyContent`, `MessageContent`, or similar properties that the framework populates before your handler executes. -Behind the scenes, aws-lambda-host injects the `UseExtractAndPackEnvelope` middleware at the end of +Behind the scenes, minimal-lambda injects the `UseExtractAndPackEnvelope` middleware at the end of every pipeline. That middleware automatically calls `IRequestEnvelope.ExtractPayload` before your handler runs and `IResponseEnvelope.PackPayload` after it finishes, guaranteeing consistent serialization for both built-in envelopes and your own custom envelope types. @@ -26,14 +26,14 @@ Install only the envelopes you need; each one lives in its own NuGet package. | Event Source | Package | NuGet | |---------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| SQS | [AwsLambda.Host.Envelopes.Sqs](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.Sqs) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | -| SNS | [AwsLambda.Host.Envelopes.Sns](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.Sns) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | -| API Gateway / HTTP API | [AwsLambda.Host.Envelopes.ApiGateway](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | -| Kinesis Data Streams | [AwsLambda.Host.Envelopes.Kinesis](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | -| Kinesis Data Firehose | [AwsLambda.Host.Envelopes.KinesisFirehose](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | -| Kafka (MSK / self-managed) | [AwsLambda.Host.Envelopes.Kafka](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.Kafka) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | -| CloudWatch Logs | [AwsLambda.Host.Envelopes.CloudWatchLogs](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | -| Application Load Balancer (ALB) | [AwsLambda.Host.Envelopes.Alb](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/Envelopes/AwsLambda.Host.Envelopes.Alb) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | +| SQS | [MinimalLambda.Envelopes.Sqs](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.Sqs) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | +| SNS | [MinimalLambda.Envelopes.Sns](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.Sns) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | +| API Gateway / HTTP API | [MinimalLambda.Envelopes.ApiGateway](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.ApiGateway) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | +| Kinesis Data Streams | [MinimalLambda.Envelopes.Kinesis](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.Kinesis) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | +| Kinesis Data Firehose | [MinimalLambda.Envelopes.KinesisFirehose](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | +| Kafka (MSK / self-managed) | [MinimalLambda.Envelopes.Kafka](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.Kafka) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | +| CloudWatch Logs | [MinimalLambda.Envelopes.CloudWatchLogs](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | +| Application Load Balancer (ALB) | [MinimalLambda.Envelopes.Alb](https://github.com/j-d-ha/minimal-lambda/tree/main/src/Envelopes/MinimalLambda.Envelopes.Alb) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | Each package ships with README examples in the repository if you need event-specific guidance. @@ -44,13 +44,13 @@ handler. This SQS example demonstrates the pattern; swap `SqsEnvelope` with a to handle SNS, API Gateway, etc. ```bash -dotnet add package AwsLambda.Host.Envelopes.Sqs +dotnet add package MinimalLambda.Envelopes.Sqs ``` ```csharp title="Program.cs" linenums="1" using Amazon.Lambda.SQSEvents; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.Sqs; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.Sqs; var builder = LambdaApplication.CreateBuilder(); var lambda = builder.Build(); @@ -102,7 +102,7 @@ envelope using `System.Xml`. See the SQS README in the repo for a complete XML s ### Advanced Configuration -- **`LambdaDefaultJsonOptions`** – aws-lambda-host maintains a second `JsonSerializerOptions` +- **`LambdaDefaultJsonOptions`** – minimal-lambda maintains a second `JsonSerializerOptions` instance for Lambda-specific envelopes (e.g., SNSβ†’SQS fan-out). Most apps shouldn’t touch it; the host copies your `JsonOptions.TypeInfoResolver` automatically. Only override it when you need different converters for those hybrid envelopes. @@ -127,8 +127,8 @@ the extraction logic. ```csharp title="CustomRequestEnvelope.cs" linenums="1" using System.Text.Json; using System.Text.Json.Serialization; -using AwsLambda.Host.Envelopes; -using AwsLambda.Host.Options; +using MinimalLambda.Envelopes; +using MinimalLambda.Options; public sealed class CustomRequestEnvelope : IRequestEnvelope { diff --git a/docs/features/index.md b/docs/features/index.md index 06dfbcb2..43fc44bf 100644 --- a/docs/features/index.md +++ b/docs/features/index.md @@ -1,6 +1,6 @@ # Features -The `AwsLambda.Host` framework provides a rich ecosystem of features and extension packages that enhance AWS Lambda development beyond the core framework capabilities. These features are designed to be modular, type-safe, and performant, integrating seamlessly with the core hosting patterns. +The `MinimalLambda` framework provides a rich ecosystem of features and extension packages that enhance AWS Lambda development beyond the core framework capabilities. These features are designed to be modular, type-safe, and performant, integrating seamlessly with the core hosting patterns. This section provides an overview of the available features. diff --git a/docs/features/open_telemetry.md b/docs/features/open_telemetry.md index f75a64d7..540d93f0 100644 --- a/docs/features/open_telemetry.md +++ b/docs/features/open_telemetry.md @@ -2,7 +2,7 @@ ## What is OpenTelemetry Integration? -The `AwsLambda.Host.OpenTelemetry` package provides seamless integration with the official [`OpenTelemetry.Instrumentation.AWSLambda`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AWSLambda) package. It acts as a smart adapter layer for `AwsLambda.Host`, using **C# 12 interceptors and source generation** to automatically instrument your Lambda handlers with minimal overhead. +The `MinimalLambda.OpenTelemetry` package provides seamless integration with the official [`OpenTelemetry.Instrumentation.AWSLambda`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AWSLambda) package. It acts as a smart adapter layer for `MinimalLambda`, using **C# 12 interceptors and source generation** to automatically instrument your Lambda handlers with minimal overhead. At compile time, it wraps your handler invocation in a root trace span, providing reflection-free, high-performance distributed tracing. @@ -27,7 +27,7 @@ Install the OpenTelemetry integration package and any required exporter packages ```bash # Core integration package -dotnet add package AwsLambda.Host.OpenTelemetry +dotnet add package MinimalLambda.OpenTelemetry # Common packages for OTLP export dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol @@ -42,7 +42,7 @@ dotnet add package OpenTelemetry.Contrib.Extensions.AWSXRay This example demonstrates how to add basic OpenTelemetry instrumentation to your Lambda function. ```csharp title="Program.cs" linenums="1" -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -106,7 +106,7 @@ internal record Response(string Message); !!! tip OpenTelemetry tracing can be configured in multiple ways, including manually creating a trace provider using the [OpenTelemetry](https://www.nuget.org/packages/OpenTelemetry), or through registering OpenTelemetry services in your DI container using [OpenTelemetry.Extensions.Hosting](https://www.nuget.org/packages/OpenTelemetry.Extensions.Hosting). - When working with `AwsLambda.Host`, its recommended to the latter approach and as such, this documentation focuses on it. + When working with `MinimalLambda`, its recommended to the latter approach and as such, this documentation focuses on it. --- @@ -128,13 +128,13 @@ The shutdown helpers (`OnShutdownFlushOpenTelemetry`, `OnShutdownFlushTracer`, a --- -## Working With `AwsLambda.Host.OpenTelemetry` +## Working With `MinimalLambda.OpenTelemetry` ### Configuration Configuration is done using the standard OpenTelemetry .NET SDK extension methods on `IServiceCollection`. Official documentation for these methods can be found [here](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Extensions.Hosting/README.md). -`AwsLambda.Host.OpenTelemetry` expectes for an instance of `TracerProvider` to be registered in the DI container as this provider is used by `OpenTelemetry.Instrumentation.AWSLambda`. As such, it is your responsibility to configure the OpenTelemetry provider and ensure it is registered in the DI container. If it is not, an exception will be thrown at startup. +`MinimalLambda.OpenTelemetry` expectes for an instance of `TracerProvider` to be registered in the DI container as this provider is used by `OpenTelemetry.Instrumentation.AWSLambda`. As such, it is your responsibility to configure the OpenTelemetry provider and ensure it is registered in the DI container. If it is not, an exception will be thrown at startup. ### Instrumenting The Invocation Pipeline @@ -162,7 +162,7 @@ Because the middleware reads event and response types dynamically from the featu The OpenTelemetry `TracerProvider` and `MeterProvider` services both implement `IDisposable`. When the dependency injection container is disposed of during a normal application shutdown, it should trigger these providers to automatically flush any buffered telemetry. However, in a serverless environment where the lifecycle can be abrupt, this disposal is not always guaranteed to complete before the execution environment is frozen. -For situations where you notice data being dropped, or if you want to guarantee a flush attempt is made, `AwsLambda.Host.OpenTelemetry` provides the following explicit helper methods. They register a function during the application's shutdown phase to manually force-flush pending telemetry. +For situations where you notice data being dropped, or if you want to guarantee a flush attempt is made, `MinimalLambda.OpenTelemetry` provides the following explicit helper methods. They register a function during the application's shutdown phase to manually force-flush pending telemetry. The following methods are available to be called on the `LambdaApplication` instance: @@ -186,12 +186,12 @@ All three methods also accept an optional `timeoutMilliseconds` parameter. This ## Manual Instrumentation -`AwsLambda.Host.OpenTelemetry` helps you instrement your Lambda handlers with [OpenTelemetry.Instrumentation.AWSLambda](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AWSLambda), but to get the most out of observability, you should add custom instrumentation to your application code. In this section we cover how this can be done easily with the Dependancy Injection support provided by `AwsLambda.Host`. +`MinimalLambda.OpenTelemetry` helps you instrement your Lambda handlers with [OpenTelemetry.Instrumentation.AWSLambda](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AWSLambda), but to get the most out of observability, you should add custom instrumentation to your application code. In this section we cover how this can be done easily with the Dependancy Injection support provided by `MinimalLambda`. !!! note - This code is not specific to `AwsLambda.Host.OpenTelemetry` and follows the guidlines provided by Microsoft's [.NET distributed tracing documetation](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing). + This code is not specific to `MinimalLambda.OpenTelemetry` and follows the guidlines provided by Microsoft's [.NET distributed tracing documetation](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing). -A full working example of an instrumented Lambda application can be found [on GitHub](https://github.com/j-d-ha/aws-lambda-host/tree/main/examples/AwsLambda.Host.Example.OpenTelemetry). +A full working example of an instrumented Lambda application can be found [on GitHub](https://github.com/j-d-ha/minimal-lambda/tree/main/examples/MinimalLambda.Example.OpenTelemetry). ### Custom Instrumentation Class @@ -200,7 +200,7 @@ The [.NET distributed tracing guidance](https://learn.microsoft.com/en-us/dotnet ```csharp title="Instrumentation.cs" linenums="1" using System.Diagnostics; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; /// /// It is recommended to use a custom type to hold references for ActivitySource. This avoids @@ -227,7 +227,7 @@ Metrics follow a similar pattern: create a class that receives an `IMeterFactory ```csharp title="NameMetrics.cs" linenums="1" using System.Diagnostics.Metrics; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; public class NameMetrics { @@ -253,7 +253,7 @@ Once the reusable helpers exist, wrap service logic in spans to capture timing, ```csharp title="NameService.cs" linenums="1" using System.Diagnostics; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; internal class NameService(Instrumentation instrumentation, NameMetrics nameMetrics) { @@ -280,12 +280,12 @@ The `using var activity = ...` pattern mirrors the BCL samples and guarantees sp ### Instrument A Handler -Finally, surface the custom instrumentation inside your Lambda handler. `AwsLambda.Host` injects any registered services, so you can receive both `IService` and `Instrumentation` directly in the handler signature. +Finally, surface the custom instrumentation inside your Lambda handler. `MinimalLambda` injects any registered services, so you can receive both `IService` and `Instrumentation` directly in the handler signature. ```csharp title="Function.cs" linenums="1" -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; internal static class Function { diff --git a/docs/getting-started/core-concepts.md b/docs/getting-started/core-concepts.md index ea3b47e9..d03d2d4a 100644 --- a/docs/getting-started/core-concepts.md +++ b/docs/getting-started/core-concepts.md @@ -1,10 +1,10 @@ # Core Concepts -This guide explains how `AwsLambda.Host` stitches together the Lambda lifecycle, dependency injection, middleware, and source generation. Knowing these building blocks makes it easier to reason about performance, testing, and extensibility as your functions grow. +This guide explains how `MinimalLambda` stitches together the Lambda lifecycle, dependency injection, middleware, and source generation. Knowing these building blocks makes it easier to reason about performance, testing, and extensibility as your functions grow. ## The Lambda Lifecycle -An execution environment progresses through distinct stages. `AwsLambda.Host` exposes each one so you can opt into work at the right time. +An execution environment progresses through distinct stages. `MinimalLambda` exposes each one so you can opt into work at the right time. ``` Cold Start β†’ OnInit β†’ Invocation 1..N β†’ OnShutdown β†’ Termination @@ -43,13 +43,13 @@ lambda.OnInit(async ( ### Invocation Pipeline -Every event runs through the middleware pipeline and handler you registered with `MapHandler`. `AwsLambda.Host` creates a scoped service provider, sets up features, and links the cancellation token to the Lambda timeout. +Every event runs through the middleware pipeline and handler you registered with `MapHandler`. `MinimalLambda` creates a scoped service provider, sets up features, and links the cancellation token to the Lambda timeout. **Invocation steps:** 1. Lambda runtime delivers the JSON payload. 2. The generated handler deserializes it (if you marked a parameter with `[Event]`). -3. `AwsLambda.Host` creates a scoped `IServiceProvider` for the invocation. +3. `MinimalLambda` creates a scoped `IServiceProvider` for the invocation. 4. Middleware executes in the order it was registered. 5. Your handler runs and can resolve services/contexts from DI. 6. The response is captured through `IResponseFeature` and serialized via the configured `ILambdaSerializer`. @@ -104,7 +104,7 @@ graph LR ## Dependency Injection Fundamentals -`AwsLambda.Host` uses the standard `Microsoft.Extensions.DependencyInjection` container. Registrations happen before `builder.Build()`, and the framework aligns service lifetimes with the Lambda lifecycle. +`MinimalLambda` uses the standard `Microsoft.Extensions.DependencyInjection` container. Registrations happen before `builder.Build()`, and the framework aligns service lifetimes with the Lambda lifecycle. | Lifetime | Created | Disposed | Use for | |-----------|--------------------------------------|-------------------------------------------|---------------------------------------------| @@ -158,7 +158,7 @@ Handlers and lifecycle hooks can request multiple parameter types simultaneously ## Middleware Pipeline -Middleware composes the invocation pipeline. Register delegates before `MapHandler`; `AwsLambda.Host` wraps them around the handler in the order you specify. +Middleware composes the invocation pipeline. Register delegates before `MapHandler`; `MinimalLambda` wraps them around the handler in the order you specify. ```csharp title="Program.cs" linenums="1" lambda.UseMiddleware(async (context, next) => @@ -198,7 +198,7 @@ Built-in feature types include: Features are created lazily. When `context.Features.Get()` executes, the framework asks each registered `IFeatureProvider` whether it can build the requested typeβ€”similar to ASP.NET Core’s feature providers. ```csharp title="Program.cs" linenums="1" -using AwsLambda.Host.Abstractions.Features; +using MinimalLambda.Abstractions.Features; lambda.UseMiddleware(async (context, next) => { @@ -222,7 +222,7 @@ Register `IFeatureProvider` implementations to add your own features or override ```csharp title="DefaultResponseFeatureProvider.cs" linenums="1" using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides a default implementation of for Lambda response diff --git a/docs/getting-started/first-lambda.md b/docs/getting-started/first-lambda.md index 0bccdfdc..edf362e8 100644 --- a/docs/getting-started/first-lambda.md +++ b/docs/getting-started/first-lambda.md @@ -1,6 +1,6 @@ # Your First Lambda Function -This tutorial walks you through building, testing, and deploying a complete Lambda function using `AwsLambda.Host`. You'll create a greeting service that demonstrates dependency injection, middleware, and type-safe handlers. +This tutorial walks you through building, testing, and deploying a complete Lambda function using `MinimalLambda`. You'll create a greeting service that demonstrates dependency injection, middleware, and type-safe handlers. ## What We'll Build @@ -17,7 +17,7 @@ A greeting service Lambda function with: Before starting, ensure you've completed the [Installation](installation.md) guide and have: -- `AwsLambda.Host` NuGet package installed +- `MinimalLambda` NuGet package installed - Project file properly configured - .NET 8 SDK installed @@ -98,7 +98,7 @@ public class GreetingService : IGreetingService Set up the Lambda application builder and register your services with dependency injection. ```csharp title="Program.cs (continued)" -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -188,7 +188,7 @@ Here's the complete code all together: using System; using System.Collections.Generic; using System.Text.Json.Serialization; -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -573,7 +573,7 @@ sequenceDiagram **Error**: `The [Event] attribute is not recognized` -**Solution**: Add `using AwsLambda.Host.Builder;` to the top of your file (or fully qualify `[AwsLambda.Host.Builder.Event]`). The attribute ships with the `AwsLambda.Host` packageβ€”no additional project configuration is required. +**Solution**: Add `using MinimalLambda.Builder;` to the top of your file (or fully qualify `[MinimalLambda.Builder.Event]`). The attribute ships with the `MinimalLambda` packageβ€”no additional project configuration is required. ### Timeout Errors @@ -594,7 +594,7 @@ sequenceDiagram Congratulations! You've built and deployed a complete Lambda function. You now understand: -- βœ… How to structure Lambda functions with `AwsLambda.Host` +- βœ… How to structure Lambda functions with `MinimalLambda` - βœ… Defining strongly-typed request/response models - βœ… Creating and registering services with dependency injection - βœ… Adding middleware for cross-cutting concerns diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index dc979945..8bc70f7b 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -1,8 +1,8 @@ # Getting Started -**`AwsLambda.Host`** brings ASP.NET Core–style hosting, dependency injection, and middleware to AWS Lambda. Instead of wiring up serialization and context handling manually, you configure a Lambda-specific host that manages scopes, middleware, and strongly typed handlers at compile time. +**`MinimalLambda`** brings ASP.NET Core–style hosting, dependency injection, and middleware to AWS Lambda. Instead of wiring up serialization and context handling manually, you configure a Lambda-specific host that manages scopes, middleware, and strongly typed handlers at compile time. -### Why `AwsLambda.Host`? +### Why `MinimalLambda`? - **Familiar patterns** – Builder APIs, DI, and middleware mirror ASP.NET Core. - **Source-generated handlers** – Avoid reflection while staying AOT ready. @@ -49,7 +49,7 @@ Prefer to explore? Head directly to **[Guides](../guides/index.md)** or **[Examp If you run into issues or have questions: -- **[GitHub Issues](https://github.com/j-d-ha/aws-lambda-host/issues)** – Report bugs or request features -- **[GitHub Discussions](https://github.com/j-d-ha/aws-lambda-host/discussions)** – Ask questions and share ideas +- **[GitHub Issues](https://github.com/j-d-ha/minimal-lambda/issues)** – Report bugs or request features +- **[GitHub Discussions](https://github.com/j-d-ha/minimal-lambda/discussions)** – Ask questions and share ideas Continue with **[Installation](installation.md)** to configure your project. diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index ef6fb78f..9e5c4465 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -1,6 +1,6 @@ # Installation -This guide walks you through installing `AwsLambda.Host` and configuring your project to build Lambda functions. +This guide walks you through installing `MinimalLambda` and configuring your project to build Lambda functions. ## System Requirements @@ -27,17 +27,17 @@ Choose your preferred installation method: dotnet new console -n MyFirstLambda cd MyFirstLambda - # Add the AwsLambda.Host package - dotnet add package AwsLambda.Host + # Add the MinimalLambda package + dotnet add package MinimalLambda ``` - *Tip: the `examples/AwsLambda.Host.Example.HelloWorld` project in this repo shows a fully configured Lambda app if you prefer copying a working template.* + *Tip: the `examples/MinimalLambda.Example.HelloWorld` project in this repo shows a fully configured Lambda app if you prefer copying a working template.* === "Visual Studio" 1. Right-click on your project in Solution Explorer 2. Select **Manage NuGet Packages** - 3. Search for `AwsLambda.Host` + 3. Search for `MinimalLambda` 4. Click **Install** === "Package Reference" @@ -46,7 +46,7 @@ Choose your preferred installation method: ```xml - + ``` @@ -118,13 +118,13 @@ Here's a complete, minimal `.csproj` file for a Lambda function: - + ``` !!! info "Source Generators" - The `AwsLambda.Host` package ships an MSBuild target that automatically registers the required interceptor namespaces. No additional configuration is needed in your project file. + The `MinimalLambda` package ships an MSBuild target that automatically registers the required interceptor namespaces. No additional configuration is needed in your project file. ## Verifying Installation @@ -135,7 +135,7 @@ Let's verify everything is set up correctly by creating a simple Lambda function Create a `Program.cs` file with this minimal example: ```csharp title="Program.cs" linenums="1" -using AwsLambda.Host; +using MinimalLambda; var builder = LambdaApplication.CreateBuilder(); var lambda = builder.Build(); @@ -174,15 +174,15 @@ Build succeeded. ## Package Overview -The `AwsLambda.Host` framework includes multiple packages for different use cases: +The `MinimalLambda` framework includes multiple packages for different use cases: ### Core Packages | Package | Purpose | When to Use | |----------------------------------|---------------------------|-----------------------------------------------| -| **AwsLambda.Host** | Core framework | Required for all Lambda functions | -| **AwsLambda.Host.Abstractions** | Interfaces and contracts | When creating custom extensions or middleware | -| **AwsLambda.Host.OpenTelemetry** | Observability integration | When you need distributed tracing and metrics | +| **MinimalLambda** | Core framework | Required for all Lambda functions | +| **MinimalLambda.Abstractions** | Interfaces and contracts | When creating custom extensions or middleware | +| **MinimalLambda.OpenTelemetry** | Observability integration | When you need distributed tracing and metrics | ### Envelope Packages @@ -190,17 +190,17 @@ Envelope packages provide type-safe, strongly-typed event handling for specific | Package | Event Source | When to Use | |----------------------------------------------|---------------------------|-------------------------------| -| **AwsLambda.Host.Envelopes.Sqs** | Amazon SQS | Processing SQS queue messages | -| **AwsLambda.Host.Envelopes.Sns** | Amazon SNS | Handling SNS notifications | -| **AwsLambda.Host.Envelopes.ApiGateway** | API Gateway | Building REST/HTTP APIs | -| **AwsLambda.Host.Envelopes.Kinesis** | Kinesis Data Streams | Processing stream records | -| **AwsLambda.Host.Envelopes.KinesisFirehose** | Kinesis Firehose | Transforming Firehose data | -| **AwsLambda.Host.Envelopes.Kafka** | Apache Kafka / MSK | Processing Kafka messages | -| **AwsLambda.Host.Envelopes.CloudWatchLogs** | CloudWatch Logs | Processing log subscriptions | -| **AwsLambda.Host.Envelopes.Alb** | Application Load Balancer | ALB target Lambda functions | +| **MinimalLambda.Envelopes.Sqs** | Amazon SQS | Processing SQS queue messages | +| **MinimalLambda.Envelopes.Sns** | Amazon SNS | Handling SNS notifications | +| **MinimalLambda.Envelopes.ApiGateway** | API Gateway | Building REST/HTTP APIs | +| **MinimalLambda.Envelopes.Kinesis** | Kinesis Data Streams | Processing stream records | +| **MinimalLambda.Envelopes.KinesisFirehose** | Kinesis Firehose | Transforming Firehose data | +| **MinimalLambda.Envelopes.Kafka** | Apache Kafka / MSK | Processing Kafka messages | +| **MinimalLambda.Envelopes.CloudWatchLogs** | CloudWatch Logs | Processing log subscriptions | +| **MinimalLambda.Envelopes.Alb** | Application Load Balancer | ALB target Lambda functions | !!! info "Envelope Packages" - You only need envelope packages if you're working with those specific event sources. For simple use cases, just `AwsLambda.Host` is sufficient. Learn more in the [Envelopes documentation](../features/envelopes.md). + You only need envelope packages if you're working with those specific event sources. For simple use cases, just `MinimalLambda` is sufficient. Learn more in the [Envelopes documentation](../features/envelopes.md). ## Troubleshooting @@ -231,12 +231,12 @@ Envelope packages provide type-safe, strongly-typed event handling for specific If you encounter issues not covered here: -- Search or ask in [GitHub Discussions](https://github.com/j-d-ha/aws-lambda-host/discussions) -- Report bugs in [GitHub Issues](https://github.com/j-d-ha/aws-lambda-host/issues) +- Search or ask in [GitHub Discussions](https://github.com/j-d-ha/minimal-lambda/discussions) +- Report bugs in [GitHub Issues](https://github.com/j-d-ha/minimal-lambda/issues) ## Next Steps -Now that you have `AwsLambda.Host` installed and verified, you're ready to build your first Lambda function! +Now that you have `MinimalLambda` installed and verified, you're ready to build your first Lambda function! **β†’ Continue to [Your First Lambda](first-lambda.md)** to build a complete Lambda function step-by-step. diff --git a/docs/guides/configuration.md b/docs/guides/configuration.md index 8b9c23dd..0810f2a5 100644 --- a/docs/guides/configuration.md +++ b/docs/guides/configuration.md @@ -1,10 +1,36 @@ # Configuration -`AwsLambda.Host` embraces the same configuration primitives as the rest of .NET: `IConfiguration` aggregates +`MinimalLambda` embraces the same configuration primitives as the rest of .NET: `IConfiguration` aggregates settings from files and environment variables, and options bind those settings into strongly typed objects. On top of that, `LambdaHostOptions` control the Lambda-specific runtime behavior (timeouts, shutdown windows, serializer choices, etc.). This guide covers both layers. +!!! warning "Breaking Change - Configuration Section Renamed" + Starting with version 2.0.0, the configuration section name has changed from `AwsLambdaHost` to `LambdaHost`. + + **Migration Required:** + + Update your `appsettings.json`: + ```json + // Before + { + "AwsLambdaHost": { + "InvocationCancellationBuffer": "00:00:05" + } + } + + // After + { + "LambdaHost": { + "InvocationCancellationBuffer": "00:00:05" + } + } + ``` + + Update environment variables: + - `AwsLambdaHost__InvocationCancellationBuffer` β†’ `LambdaHost__InvocationCancellationBuffer` + - Pattern: `AwsLambdaHost__*` β†’ `LambdaHost__*` + ## How Configuration Is Built `LambdaApplication.CreateBuilder()` wires up the standard .NET defaults unless you pass @@ -39,12 +65,12 @@ providers are added in the following order (later entries override earlier ones) ); ``` -The builder also binds the `AwsLambdaHost` section (from JSON or environment variables) into +The builder also binds the `LambdaHost` section (from JSON or environment variables) into `LambdaHostOptions` so framework settings can live next to your app configuration. ```json title="appsettings.json" { - "AwsLambdaHost": { + "LambdaHost": { "InitTimeout": "00:00:10", "InvocationCancellationBuffer": "00:00:05", "ShutdownDuration": "00:00:00.5000000", @@ -54,11 +80,11 @@ The builder also binds the `AwsLambdaHost` section (from JSON or environment var } ``` -Alternatively, set environment variables using the `AwsLambdaHost__{Option}` naming convention: +Alternatively, set environment variables using the `LambdaHost__{Option}` naming convention: ```bash -AwsLambdaHost__InvocationCancellationBuffer=00:00:05 -AwsLambdaHost__ClearLambdaOutputFormatting=true +LambdaHost__InvocationCancellationBuffer=00:00:05 +LambdaHost__ClearLambdaOutputFormatting=true ``` ## LambdaHostOptions Reference @@ -126,7 +152,7 @@ lambda.MapHandler(async ([Event] Order order, IOrderService service, Cancellatio ### `ShutdownDuration` and `ShutdownDurationBuffer` Lambda signals shutdown with SIGTERM and later SIGKILL. Configure how long you expect to have between -those signals and how much buffer `AwsLambda.Host` should reserve before cancelling `OnShutdown` +those signals and how much buffer `MinimalLambda` should reserve before cancelling `OnShutdown` handlers. ```csharp title="Program.cs" linenums="1" @@ -151,7 +177,7 @@ Choose from the provided constants when possible: The .NET Lambda runtime captures stdout/stderr and wraps each line with its own structured record. When you rely on structured loggers (Serilog, MEL JSON) or run locally, disable that extra formatting. -`AwsLambda.Host` registers the built-in OnInit handler automatically when this option is `true`. +`MinimalLambda` registers the built-in OnInit handler automatically when this option is `true`. ```csharp title="Program.cs" linenums="1" builder.Services.ConfigureLambdaHostOptions(options => @@ -160,8 +186,8 @@ builder.Services.ConfigureLambdaHostOptions(options => }); ``` -Prefer configuration files? Set `"AwsLambdaHost": { "ClearLambdaOutputFormatting": true }` or the -`AwsLambdaHost__ClearLambdaOutputFormatting` environment variable. +Prefer configuration files? Set `"LambdaHost": { "ClearLambdaOutputFormatting": true }` or the +`LambdaHost__ClearLambdaOutputFormatting` environment variable. ### `BootstrapHttpClient` @@ -300,7 +326,7 @@ Resources: Variables: DATABASE__CONNECTIONSTRING: !Ref DatabaseConnectionString API_KEY: !Ref ApiKey - AwsLambdaHost__ClearLambdaOutputFormatting: true + LambdaHost__ClearLambdaOutputFormatting: true ``` Prefer the double underscore `__` separator when targeting hierarchical keys. @@ -319,7 +345,7 @@ builder.Services.Configure(options => ## JSON Serialization Configuration -`AwsLambda.Host` defaults to `System.Text.Json` with camelCase naming, case-insensitive reads, and +`MinimalLambda` defaults to `System.Text.Json` with camelCase naming, case-insensitive reads, and null-value ignoring. Because the Lambda serializer is an `ILambdaSerializer` singleton, you configure it by registering the serializer instance you want (either the built-in `DefaultLambdaJsonSerializer` with custom `JsonSerializerOptions` or your own implementation). @@ -371,7 +397,7 @@ For more complex rules implement `IValidatableObject` or add a custom validator. - **Validate on startup** – `ValidateOnStart()` catches missing sections before Lambda accepts traffic. - **Copy `appsettings.*` to the output** – Without it, Lambda cannot load the files. - **Use environment variables for secrets** – Combine SAM/CDK parameters with Secrets Manager references. -- **Stick to `AwsLambdaHost` section for framework knobs** – Keeps host settings discoverable and +- **Stick to `LambdaHost` section for framework knobs** – Keeps host settings discoverable and separate from business configuration. - **Clear Lambda output formatting when you own logging** – Avoid double-wrapping JSON payloads. @@ -384,8 +410,8 @@ For more complex rules implement `IValidatableObject` or add a custom validator. **Environment variable not loaded** – Remember to add `builder.Configuration.AddEnvironmentVariables()` if you call `CreateBuilder(new LambdaApplicationOptions { DisableDefaults = true })`. -**LambdaHostOptions ignored** – Verify the JSON is under `"AwsLambdaHost"` or that the environment -variable uses `AwsLambdaHost__OptionName`. +**LambdaHostOptions ignored** – Verify the JSON is under `"LambdaHost"` or that the environment +variable uses `LambdaHost__OptionName`. ## Next Steps diff --git a/docs/guides/dependency-injection.md b/docs/guides/dependency-injection.md index 726a75d6..6723fdc8 100644 --- a/docs/guides/dependency-injection.md +++ b/docs/guides/dependency-injection.md @@ -1,6 +1,6 @@ # Dependency Injection -`aws-lambda-host` uses the same dependency injection container as ASP.NET Core +`minimal-lambda` uses the same dependency injection container as ASP.NET Core (`Microsoft.Extensions.DependencyInjection`). If you're new to DI in .NET, start with the [official documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection) and then come back for Lambda-specific guidance. This guide focuses on what changes (and what stays the @@ -147,4 +147,4 @@ lambda.MapHandler(( - Use the options pattern for config and keyed services for multiple implementations. - For fundamentals, refer back to the [official DI docs](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection). -With these patterns, `AwsLambda.Host` feels just like ASP.NET Core, but tuned for the Lambda lifecycle. +With these patterns, `MinimalLambda` feels just like ASP.NET Core, but tuned for the Lambda lifecycle. diff --git a/docs/guides/error-handling.md b/docs/guides/error-handling.md index 00ef16dc..bb44acfc 100644 --- a/docs/guides/error-handling.md +++ b/docs/guides/error-handling.md @@ -1,13 +1,13 @@ # Error Handling -`AwsLambda.Host` does not hide exceptionsβ€”it embraces the standard .NET model so you can decide where +`MinimalLambda` does not hide exceptionsβ€”it embraces the standard .NET model so you can decide where to intercept failures. This guide explains how errors flow through handlers, middleware, and lifecycle hooks so you can add the right amount of protection without fighting the framework. ## Invocation Errors: What Happens by Default - Handlers run inside the middleware pipeline. If a handler throws and nothing catches the exception, - `AwsLambda.Host` lets it bubble back through the pipeline. + `MinimalLambda` lets it bubble back through the pipeline. - Once the exception leaves the outermost middleware, the AWS .NET Lambda runtime records the error, writes it to CloudWatch Logs, and returns a failed invocation (with retries governed by the event source). @@ -82,7 +82,7 @@ lambda.MapHandler(async ([Event] CheckoutRequest request, ICheckoutService servi handler executes in its own DI scope and errors are aggregated: - **OnInit** – All handlers run concurrently with a token derived from - `LambdaHostOptions.InitTimeout`. Each handler can optionally return `bool`. `AwsLambda.Host` collects + `LambdaHostOptions.InitTimeout`. Each handler can optionally return `bool`. `MinimalLambda` collects every exception and throws an `AggregateException("Encountered errors while running OnInit handlers", …)` if any fail. If a handler returns `false`, initialization aborts even when no exception occurred. - **OnShutdown** – Handlers also run concurrently. Any exception is captured and rethrown as an @@ -106,7 +106,7 @@ Because the host rethrows aggregate exceptions, CloudWatch logs clearly show eve ## Timeouts and Cancellation -`AwsLambda.Host` links invocation tokens to the Lambda timeout using +`MinimalLambda` links invocation tokens to the Lambda timeout using `LambdaHostOptions.InvocationCancellationBuffer`. Honor that token in services and middlewareβ€”if your code catches `OperationCanceledException`, log and rethrow so the runtime still marks the invocation as failed rather than silently succeeding. diff --git a/docs/guides/handler-registration.md b/docs/guides/handler-registration.md index 0c8241ad..f590a6bb 100644 --- a/docs/guides/handler-registration.md +++ b/docs/guides/handler-registration.md @@ -1,11 +1,11 @@ # Handler Registration -`MapHandler` is the entry point for telling `AwsLambda.Host` which delegate should process events. The call looks like an ordinary lambda registration, but source generators intercept it at compile time to wire up serialization, dependency injection, and middleware without reflection. +`MapHandler` is the entry point for telling `MinimalLambda` which delegate should process events. The call looks like an ordinary lambda registration, but source generators intercept it at compile time to wire up serialization, dependency injection, and middleware without reflection. ## Registering a Handler ```csharp title="Program.cs" linenums="1" -using AwsLambda.Host; +using MinimalLambda; using Microsoft.Extensions.DependencyInjection; var builder = LambdaApplication.CreateBuilder(); @@ -84,7 +84,7 @@ await lambda.RunAsync(); ## Handler Signatures and the `[Event]` Parameter -Handlers that receive an incoming payload must identify exactly one parameter with `[Event]`. The generator uses that marker to synthesize deserialization logic (JSON by default, or whatever envelope/serializer is active). If your Lambda does **not** expect input (e.g., scheduled jobs, health checks, etc.), you can omit the `[Event]` attribute entirelyβ€”just define a handler with no payload parameter and `AwsLambda.Host` skips the event binding phase. +Handlers that receive an incoming payload must identify exactly one parameter with `[Event]`. The generator uses that marker to synthesize deserialization logic (JSON by default, or whatever envelope/serializer is active). If your Lambda does **not** expect input (e.g., scheduled jobs, health checks, etc.), you can omit the `[Event]` attribute entirelyβ€”just define a handler with no payload parameter and `MinimalLambda` skips the event binding phase. - `[Event]` may appear on reference types, structs, records, collection types, or envelope types such as `ApiGatewayRequestEnvelope`. - Handlers without payloads can simply omit `[Event]` by not declaring an event parameter at all. @@ -191,7 +191,7 @@ At runtime: ## Patterns and Best Practices - Keep handlers thin. Delegate business logic to services so you can test them outside Lambda and reuse them across handlers. -- Respect the provided `CancellationToken`; `AwsLambda.Host` fires it `InvocationCancellationBuffer` before the hard Lambda timeout. +- Respect the provided `CancellationToken`; `MinimalLambda` fires it `InvocationCancellationBuffer` before the hard Lambda timeout. - Prefer strongly typed responses or envelopes instead of anonymous objectsβ€”serialization contracts stay predictable and versionable. - Use `ILambdaHostContext.Features` (e.g., `context.GetEvent()`) to decouple middleware from handlers when you need shared metadata. - Avoid resolving services manually from `IServiceProvider` unless absolutely necessary. Let the generator inject what you need, or expose a dedicated facade service. diff --git a/docs/guides/hosting.md b/docs/guides/hosting.md index 2bbb7e0c..ed45f216 100644 --- a/docs/guides/hosting.md +++ b/docs/guides/hosting.md @@ -9,7 +9,7 @@ Calling `LambdaApplication.CreateBuilder()` assembles a standard .NET host with - **Configuration sources** – Adds `appsettings.json`, `appsettings.{Environment}.json`, user secrets (development), `AWS_` and `DOTNET_` prefixed environment variables, and ambient environment variables. The resulting `ConfigurationManager` is exposed via `builder.Configuration`. - **Environment & content root** – Sets `IHostEnvironment.ApplicationName` from `AWS_LAMBDA_FUNCTION_NAME` (when available) and resolves the content root by honoring `DOTNET_CONTENTROOT`, `AWS_LAMBDA_TASK_ROOT`, or falling back to `Directory.GetCurrentDirectory()`. - **Logging** – Registers console logging with activity tracking enabled. In Development, scope validation is turned on so singleton/scoped misuse throws during build. -- **Dependency injection** – Every call to `builder.Services` hits the standard `IServiceCollection`. On `builder.Build()`, aws-lambda-host registers: +- **Dependency injection** – Every call to `builder.Services` hits the standard `IServiceCollection`. On `builder.Build()`, minimal-lambda registers: - `ILambdaInvocationBuilderFactory`, `ILambdaOnInitBuilderFactory`, and `ILambdaOnShutdownBuilderFactory` so lambda-specific pipelines can be composed later. - `LambdaHostedService`, `ILambdaHandlerFactory`, feature collections, and `ILambdaBootstrapOrchestrator`. - Default implementations of `ILambdaSerializer` (System.Text.Json) and `ILambdaCancellationFactory` unless you already registered your own via `TryAddLambdaHostDefaultServices()`. @@ -17,7 +17,7 @@ Calling `LambdaApplication.CreateBuilder()` assembles a standard .NET host with Most applications can rely entirely on `CreateBuilder()` + `builder.Build()`β€”just add services, middleware, handlers, and call `await lambda.RunAsync();`. ```csharp title="Program.cs" linenums="1" -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; var builder = LambdaApplication.CreateBuilder(); diff --git a/docs/guides/index.md b/docs/guides/index.md index b0899c23..2ab18fc1 100644 --- a/docs/guides/index.md +++ b/docs/guides/index.md @@ -1,6 +1,6 @@ # Guides -Comprehensive guides for building production Lambda functions with `AwsLambda.Host`. Each guide provides in-depth coverage of a specific framework feature with complete examples, best practices, and troubleshooting. +Comprehensive guides for building production Lambda functions with `MinimalLambda`. Each guide provides in-depth coverage of a specific framework feature with complete examples, best practices, and troubleshooting. ## Core Framework Guides @@ -104,7 +104,7 @@ Write comprehensive tests for your Lambda functions using xUnit, NSubstitute, an ## Learning Path -### New to `AwsLambda.Host`? +### New to `MinimalLambda`? Start with [Getting Started](../getting-started/index.md) to build your first Lambda function, then return here for deeper coverage of specific features. @@ -126,8 +126,8 @@ After mastering the guides, explore [Advanced Topics](../advanced/index.md) for If you encounter issues not covered in these guides: -- Search or ask in [GitHub Discussions](https://github.com/j-d-ha/aws-lambda-host/discussions) -- Report bugs in [GitHub Issues](https://github.com/j-d-ha/aws-lambda-host/issues) +- Search or ask in [GitHub Discussions](https://github.com/j-d-ha/minimal-lambda/discussions) +- Report bugs in [GitHub Issues](https://github.com/j-d-ha/minimal-lambda/issues) --- diff --git a/docs/guides/lifecycle-management.md b/docs/guides/lifecycle-management.md index 88946cd8..f8bdaefe 100644 --- a/docs/guides/lifecycle-management.md +++ b/docs/guides/lifecycle-management.md @@ -1,6 +1,6 @@ # Lifecycle Management -`AwsLambda.Host` exposes the entire Lambda container lifecycle so you can prepare resources during cold start, react to each invocation, and cleanly shut down when AWS reclaims the execution environment. +`MinimalLambda` exposes the entire Lambda container lifecycle so you can prepare resources during cold start, react to each invocation, and cleanly shut down when AWS reclaims the execution environment. ## Execution Flow at a Glance @@ -12,12 +12,12 @@ Cold Start β†’ OnInit β†’ Invocation 1..N β†’ OnShutdown β†’ Termination - **Invocation** – Runs for every event in the normal middleware/handler pipeline. Cancellation tokens respect `InvocationCancellationBuffer`. - **OnShutdown** – Runs once when the runtime receives SIGTERM or when the host stops. Used to flush telemetry or close connections. -Both OnInit and OnShutdown execute outside the invocation pipeline, but `AwsLambda.Host` creates a brand-new `IServiceScope` for every handler so you can resolve scoped services safely. +Both OnInit and OnShutdown execute outside the invocation pipeline, but `MinimalLambda` creates a brand-new `IServiceScope` for every handler so you can resolve scoped services safely. ## OnInit: Cold Start Hooks ```csharp title="Program.cs" -using AwsLambda.Host; +using MinimalLambda; using Microsoft.Extensions.DependencyInjection; var builder = LambdaApplication.CreateBuilder(); @@ -46,8 +46,8 @@ await lambda.RunAsync(); - Runs once per execution environment and shares time with your first invocation. - Each handler receives a linked `CancellationToken` that cancels when `InitTimeout` elapses or the host stops (default 5 seconds). -- You may register multiple handlers; `AwsLambda.Host` runs them **concurrently** via `Task.WhenAll`. -- Returning a `bool`/`Task` is optional. If you return a value it controls whether the cold start continues (`true`) or aborts (`false`); if you return `void`/`Task`, `AwsLambda.Host` assumes success. +- You may register multiple handlers; `MinimalLambda` runs them **concurrently** via `Task.WhenAll`. +- Returning a `bool`/`Task` is optional. If you return a value it controls whether the cold start continues (`true`) or aborts (`false`); if you return `void`/`Task`, `MinimalLambda` assumes success. - Exceptions are aggregated. If any handler throws, the framework logs all failures and aborts initialization. ### Handling Failure and Timeouts @@ -133,7 +133,7 @@ Both handlers are awaited simultaneously. Keep shutdown work smallβ€”only the re OnInit and OnShutdown handlers support the same source-generated dependency injection experience as middleware and handlers: - Request only what you need. The generated delegate resolves typed parameters (services, keyed services, `ILambdaHostContext`, `CancellationToken`, etc.). -- `AwsLambda.Host` creates a new `IServiceScope` for every handler invocation, ensuring scoped services (database units of work, caches) are isolated even though you are outside the invocation pipeline. +- `MinimalLambda` creates a new `IServiceScope` for every handler invocation, ensuring scoped services (database units of work, caches) are isolated even though you are outside the invocation pipeline. - The `IServiceProvider` parameter gives you direct access to the scope for manual resolution when needed. ```csharp title="Program.cs" diff --git a/docs/guides/middleware.md b/docs/guides/middleware.md index 6e1a6eb3..8225be65 100644 --- a/docs/guides/middleware.md +++ b/docs/guides/middleware.md @@ -1,6 +1,6 @@ # Middleware -`aws-lambda-host` uses the same middleware model as ASP.NET Core: each component gets a context object, +`minimal-lambda` uses the same middleware model as ASP.NET Core: each component gets a context object, runs code before/after the next component, and can short-circuit the pipeline. If you're new to the pattern, skim the [ASP.NET Core middleware overview](https://learn.microsoft.com/aspnet/core/fundamentals/middleware/) first. This guide focuses on Lambda-specific behavior: invocation scopes, feature access, and @@ -91,7 +91,7 @@ collection lazily creates features by asking every registered `IFeatureProvider` first requested. ```csharp title="Program.cs" -using AwsLambda.Host.Abstractions.Features; +using MinimalLambda.Abstractions.Features; lambda.UseMiddleware(async (context, next) => { @@ -169,14 +169,14 @@ These methods are equivalent to calling `context.Features.Get>( ### Feature Providers in Practice -When `context.Features.Get()` runs, `AwsLambda.Host` walks through every registered `IFeatureProvider` +When `context.Features.Get()` runs, `MinimalLambda` walks through every registered `IFeatureProvider` until one returns the requested feature. Built-in providers handle common cases such as response serialization. Use the same pattern for your features. ```csharp title="DefaultResponseFeatureProvider.cs" linenums="1" using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides a default implementation of for Lambda response diff --git a/docs/index.md b/docs/index.md index 965af824..7ba2df56 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,18 +2,16 @@ title: "" --- -# Build AWS Lambda Functions with .NET Hosting Patterns +# MinimalLambda: ASP.NET Core Patterns for Lambda -[![Main Build](https://github.com/j-d-ha/aws-lambda-host/actions/workflows/main-build.yaml/badge.svg)](https://github.com/j-d-ha/aws-lambda-host/actions/workflows/main-build.yaml) -[![codecov](https://codecov.io/gh/j-d-ha/aws-lambda-host/graph/badge.svg?token=BWORPTQ0UK)](https://codecov.io/gh/j-d-ha/aws-lambda-host) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=j-d-ha_aws-lambda-host&metric=alert_status&token=9fb519975d91379dcfbc6c13a4bd4207131af6e3)](https://sonarcloud.io/summary/new_code?id=j-d-ha_aws-lambda-host) -[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/j-d-ha/aws-lambda-host/blob/main/LICENSE) +[![Main Build](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml/badge.svg)](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml) +[![codecov](https://codecov.io/gh/j-d-ha/minimal-lambda/graph/badge.svg?token=BWORPTQ0UK)](https://codecov.io/gh/j-d-ha/minimal-lambda) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=j-d-ha_minimal-lambda&metric=alert_status&token=9fb519975d91379dcfbc6c13a4bd4207131af6e3)](https://sonarcloud.io/summary/new_code?id=j-d-ha_minimal-lambda) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/j-d-ha/minimal-lambda/blob/main/LICENSE) -AwsLambda.Host is a lightweight hosting framework for .NET developers who want the comfort of ASP.NET -Core’s middleware, dependency injection, and lifecycle hooks inside AWS Lambda. Instead of wiring up -scopes, serializers, and cancellation tokens by hand, you map strongly typed handlers and let the -source-generated pipeline handle the plumbing. The result: less boilerplate, better testability, and -handlers that feel like the rest of your .NET codebase. +**If you know ASP.NET Core Minimal APIs, you already know MinimalLambda.** + +MinimalLambda brings the clean, declarative coding style of ASP.NET Core Minimal APIs to AWS Lambda – for **any event source** (SQS, SNS, API Gateway, Kinesis, S3, EventBridge, etc.). Use the same builder pattern, dependency injection, middleware pipeline, and handler mapping that you're familiar with from ASP.NET Core – but optimized for Lambda's execution model with source generation, proper scoped lifetimes, and automatic cancellation token handling. [Get Started](getting-started/index.md){ .md-button .md-button--primary } [Guides](guides/index.md){ .md-button } @@ -21,7 +19,7 @@ handlers that feel like the rest of your .NET codebase. --- -## Why AwsLambda.Host? +## Why MinimalLambda? Stop wiring up DI scopes, serializers, and cancellation tokens by hand. Ship features with patterns you already know, while still embracing Lambda’s execution model. @@ -74,7 +72,7 @@ already know, while still embracing Lambda’s execution model. ``` -=== "`AwsLambda.Host`" +=== "`MinimalLambda`" ```csharp // βœ… Familiar .NET Core builder pattern @@ -164,13 +162,13 @@ Small abstraction surface area keeps CPU and memory usage predictable inside Lam Install the NuGet package: ```bash -dotnet add package AwsLambda.Host +dotnet add package MinimalLambda ``` Create your first Lambda handler: ```csharp -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; var builder = LambdaApplication.CreateBuilder(); var lambda = builder.Build(); @@ -195,9 +193,9 @@ for building AWS Lambda functions. | Package | Description | NuGet | Downloads | |------------------------------------------------------------------|-----------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/AwsLambda.Host) | Core hosting framework with middleware and DI | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](https://github.com/j-d-ha/aws-lambda-host/tree/main/src/AwsLambda.Host.Abstractions) | Core interfaces and contracts | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](features/open_telemetry.md) | Distributed tracing and observability | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | +| [**MinimalLambda**](https://github.com/j-d-ha/minimal-lambda/tree/main/src/MinimalLambda) | Core hosting framework with middleware and DI | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](https://github.com/j-d-ha/minimal-lambda/tree/main/src/MinimalLambda.Abstractions) | Core interfaces and contracts | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](features/open_telemetry.md) | Distributed tracing and observability | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | ### Envelope Packages @@ -213,14 +211,14 @@ deserialization. | Package | Description | NuGet | Downloads | |----------------------------------------------------------------------------------------|-------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **AwsLambda.Host.Envelopes.Sqs** | Simple Queue Service events with typed message bodies | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| **AwsLambda.Host.Envelopes.Sns** | Simple Notification Service messages | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| **AwsLambda.Host.Envelopes.ApiGateway** | REST, HTTP, and WebSocket APIs | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| **AwsLambda.Host.Envelopes.Kinesis** | Data Streams with typed records | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| **AwsLambda.Host.Envelopes.KinesisFirehose** | Data transformation | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| **AwsLambda.Host.Envelopes.Kafka** | MSK and self-managed Kafka | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| **AwsLambda.Host.Envelopes.CloudWatchLogs** | Log subscriptions | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| **AwsLambda.Host.Envelopes.Alb** | Application Load Balancer requests | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| **MinimalLambda.Envelopes.Sqs** | Simple Queue Service events with typed message bodies | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| **MinimalLambda.Envelopes.Sns** | Simple Notification Service messages | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| **MinimalLambda.Envelopes.ApiGateway** | REST, HTTP, and WebSocket APIs | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| **MinimalLambda.Envelopes.Kinesis** | Data Streams with typed records | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| **MinimalLambda.Envelopes.KinesisFirehose** | Data transformation | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| **MinimalLambda.Envelopes.Kafka** | MSK and self-managed Kafka | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| **MinimalLambda.Envelopes.CloudWatchLogs** | Log subscriptions | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| **MinimalLambda.Envelopes.Alb** | Application Load Balancer requests | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | [Browse all envelope packages](features/envelopes.md){ .md-button } @@ -239,9 +237,9 @@ soon) for end-to-end Lambda samples that wire up middleware, envelopes, and DI. ### Get Involved -- **[GitHub Repository](https://github.com/j-d-ha/aws-lambda-host)** – Source code, issues, and discussions. +- **[GitHub Repository](https://github.com/j-d-ha/minimal-lambda)** – Source code, issues, and discussions. - **[Changelog](changelog.md)** – Version history and release notes. -- **[License](https://github.com/j-d-ha/aws-lambda-host/blob/main/LICENSE)** – MIT License. +- **[License](https://github.com/j-d-ha/minimal-lambda/blob/main/LICENSE)** – MIT License. ### Documentation @@ -252,8 +250,8 @@ soon) for end-to-end Lambda samples that wire up middleware, envelopes, and DI. ### Support -- Ask or search in [GitHub Discussions](https://github.com/j-d-ha/aws-lambda-host/discussions). -- File bugs or feature requests via [GitHub Issues](https://github.com/j-d-ha/aws-lambda-host/issues). +- Ask or search in [GitHub Discussions](https://github.com/j-d-ha/minimal-lambda/discussions). +- File bugs or feature requests via [GitHub Issues](https://github.com/j-d-ha/minimal-lambda/issues). --- diff --git a/examples/AwsLambda.Host.Example.Events/AwsLambda.Host.Example.Events.csproj b/examples/MinimalLambda.Example.Events/MinimalLambda.Example.Events.csproj similarity index 62% rename from examples/AwsLambda.Host.Example.Events/AwsLambda.Host.Example.Events.csproj rename to examples/MinimalLambda.Example.Events/MinimalLambda.Example.Events.csproj index e89e871f..9dc53ef2 100644 --- a/examples/AwsLambda.Host.Example.Events/AwsLambda.Host.Example.Events.csproj +++ b/examples/MinimalLambda.Example.Events/MinimalLambda.Example.Events.csproj @@ -11,21 +11,21 @@ true true - $(InterceptorsNamespaces);AwsLambda.Host - Lambda.Host.Example.Events + $(InterceptorsNamespaces);MinimalLambda.Generated + MinimalLambda.Example.Events false false - + - - - + + + diff --git a/examples/AwsLambda.Host.Example.Events/Program.cs b/examples/MinimalLambda.Example.Events/Program.cs similarity index 95% rename from examples/AwsLambda.Host.Example.Events/Program.cs rename to examples/MinimalLambda.Example.Events/Program.cs index 864d70e6..752238b1 100644 --- a/examples/AwsLambda.Host.Example.Events/Program.cs +++ b/examples/MinimalLambda.Example.Events/Program.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.ApiGateway; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.ApiGateway; var builder = LambdaApplication.CreateBuilder(); diff --git a/examples/AwsLambda.Host.Example.Events/Properties/launchSettings.json b/examples/MinimalLambda.Example.Events/Properties/launchSettings.json similarity index 100% rename from examples/AwsLambda.Host.Example.Events/Properties/launchSettings.json rename to examples/MinimalLambda.Example.Events/Properties/launchSettings.json diff --git a/examples/AwsLambda.Host.Example.Events/appsettings.json b/examples/MinimalLambda.Example.Events/appsettings.json similarity index 94% rename from examples/AwsLambda.Host.Example.Events/appsettings.json rename to examples/MinimalLambda.Example.Events/appsettings.json index 53160eba..9942f934 100644 --- a/examples/AwsLambda.Host.Example.Events/appsettings.json +++ b/examples/MinimalLambda.Example.Events/appsettings.json @@ -1,5 +1,5 @@ { - "AwsLambdaHost": { + "LambdaHost": { "InvocationCancellationBuffer": "00:00:05" }, "Logging": { diff --git a/examples/AwsLambda.Host.Example.HelloWorld/AwsLambda.Host.Example.HelloWorld.csproj b/examples/MinimalLambda.Example.HelloWorld/MinimalLambda.Example.HelloWorld.csproj similarity index 67% rename from examples/AwsLambda.Host.Example.HelloWorld/AwsLambda.Host.Example.HelloWorld.csproj rename to examples/MinimalLambda.Example.HelloWorld/MinimalLambda.Example.HelloWorld.csproj index 8ad8e03f..0b7656ab 100644 --- a/examples/AwsLambda.Host.Example.HelloWorld/AwsLambda.Host.Example.HelloWorld.csproj +++ b/examples/MinimalLambda.Example.HelloWorld/MinimalLambda.Example.HelloWorld.csproj @@ -11,19 +11,18 @@ true true - $(InterceptorsNamespaces);AwsLambda.Host - Lambda.Host.Example.HelloWorld + $(InterceptorsNamespaces);MinimalLambda.Generated + MinimalLambda.Example.HelloWorld false - - + - + diff --git a/examples/AwsLambda.Host.Example.HelloWorld/Program.cs b/examples/MinimalLambda.Example.HelloWorld/Program.cs similarity index 94% rename from examples/AwsLambda.Host.Example.HelloWorld/Program.cs rename to examples/MinimalLambda.Example.HelloWorld/Program.cs index 7a1a8799..fb355c6b 100644 --- a/examples/AwsLambda.Host.Example.HelloWorld/Program.cs +++ b/examples/MinimalLambda.Example.HelloWorld/Program.cs @@ -1,6 +1,6 @@ ο»Ώusing System; -using AwsLambda.Host.Builder; using Microsoft.Extensions.Hosting; +using MinimalLambda.Builder; // Create the application builder var builder = LambdaApplication.CreateBuilder(); diff --git a/examples/AwsLambda.Host.Example.HelloWorld/Properties/launchSettings.json b/examples/MinimalLambda.Example.HelloWorld/Properties/launchSettings.json similarity index 83% rename from examples/AwsLambda.Host.Example.HelloWorld/Properties/launchSettings.json rename to examples/MinimalLambda.Example.HelloWorld/Properties/launchSettings.json index 9f3c9991..62ea7d9a 100644 --- a/examples/AwsLambda.Host.Example.HelloWorld/Properties/launchSettings.json +++ b/examples/MinimalLambda.Example.HelloWorld/Properties/launchSettings.json @@ -8,7 +8,7 @@ "DOTNET_ENVIRONMENT": "Development", "AWS_LAMBDA_LOG_FORMAT": "JSON", "AWS_LAMBDA_LOG_LEVEL": "DEBUG", - "AWS_LAMBDA_FUNCTION_NAME": "Lambda-Host-Example-HelloWorld" + "AWS_LAMBDA_FUNCTION_NAME": "MinimalLambda-Example-HelloWorld" } } } diff --git a/examples/AwsLambda.Host.Example.HelloWorld/appsettings.json b/examples/MinimalLambda.Example.HelloWorld/appsettings.json similarity index 94% rename from examples/AwsLambda.Host.Example.HelloWorld/appsettings.json rename to examples/MinimalLambda.Example.HelloWorld/appsettings.json index 53160eba..9942f934 100644 --- a/examples/AwsLambda.Host.Example.HelloWorld/appsettings.json +++ b/examples/MinimalLambda.Example.HelloWorld/appsettings.json @@ -1,5 +1,5 @@ { - "AwsLambdaHost": { + "LambdaHost": { "InvocationCancellationBuffer": "00:00:05" }, "Logging": { diff --git a/examples/AwsLambda.Host.Example.HelloWorldAot/AwsLambda.Host.Example.HelloWorldAot.csproj b/examples/MinimalLambda.Example.HelloWorldAot/MinimalLambda.Example.HelloWorldAot.csproj similarity index 81% rename from examples/AwsLambda.Host.Example.HelloWorldAot/AwsLambda.Host.Example.HelloWorldAot.csproj rename to examples/MinimalLambda.Example.HelloWorldAot/MinimalLambda.Example.HelloWorldAot.csproj index 857237e9..83de0610 100644 --- a/examples/AwsLambda.Host.Example.HelloWorldAot/AwsLambda.Host.Example.HelloWorldAot.csproj +++ b/examples/MinimalLambda.Example.HelloWorldAot/MinimalLambda.Example.HelloWorldAot.csproj @@ -19,14 +19,14 @@ full bootstrap true - $(InterceptorsNamespaces);AwsLambda.Host - Lambda.Host.Example.HelloWorldAot + $(InterceptorsNamespaces);MinimalLambda.Generated + MinimalLambda.Example.HelloWorldAot false - + diff --git a/examples/AwsLambda.Host.Example.HelloWorldAot/Program.cs b/examples/MinimalLambda.Example.HelloWorldAot/Program.cs similarity index 97% rename from examples/AwsLambda.Host.Example.HelloWorldAot/Program.cs rename to examples/MinimalLambda.Example.HelloWorldAot/Program.cs index 2c9ce762..3cee8ebc 100644 --- a/examples/AwsLambda.Host.Example.HelloWorldAot/Program.cs +++ b/examples/MinimalLambda.Example.HelloWorldAot/Program.cs @@ -1,8 +1,8 @@ ο»Ώusing System; using System.Text.Json.Serialization; -using AwsLambda.Host.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using MinimalLambda.Builder; var builder = LambdaApplication.CreateBuilder(); diff --git a/examples/AwsLambda.Host.Example.HelloWorldAot/Properties/launchSettings.json b/examples/MinimalLambda.Example.HelloWorldAot/Properties/launchSettings.json similarity index 100% rename from examples/AwsLambda.Host.Example.HelloWorldAot/Properties/launchSettings.json rename to examples/MinimalLambda.Example.HelloWorldAot/Properties/launchSettings.json diff --git a/examples/AwsLambda.Host.Example.Lifecycle/AwsLambda.Host.Example.Lifecycle.csproj b/examples/MinimalLambda.Example.Lifecycle/MinimalLambda.Example.Lifecycle.csproj similarity index 79% rename from examples/AwsLambda.Host.Example.Lifecycle/AwsLambda.Host.Example.Lifecycle.csproj rename to examples/MinimalLambda.Example.Lifecycle/MinimalLambda.Example.Lifecycle.csproj index cc06c656..6df39b83 100644 --- a/examples/AwsLambda.Host.Example.Lifecycle/AwsLambda.Host.Example.Lifecycle.csproj +++ b/examples/MinimalLambda.Example.Lifecycle/MinimalLambda.Example.Lifecycle.csproj @@ -11,13 +11,13 @@ true true - $(InterceptorsNamespaces);AwsLambda.Host + $(InterceptorsNamespaces);MinimalLambda.Generated false - + diff --git a/examples/AwsLambda.Host.Example.Lifecycle/Program.cs b/examples/MinimalLambda.Example.Lifecycle/Program.cs similarity index 98% rename from examples/AwsLambda.Host.Example.Lifecycle/Program.cs rename to examples/MinimalLambda.Example.Lifecycle/Program.cs index f1981538..3692dabc 100644 --- a/examples/AwsLambda.Host.Example.Lifecycle/Program.cs +++ b/examples/MinimalLambda.Example.Lifecycle/Program.cs @@ -2,9 +2,9 @@ using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using AwsLambda.Host.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using MinimalLambda.Builder; var builder = LambdaApplication.CreateBuilder(); diff --git a/examples/AwsLambda.Host.Example.Lifecycle/Properties/launchSettings.json b/examples/MinimalLambda.Example.Lifecycle/Properties/launchSettings.json similarity index 100% rename from examples/AwsLambda.Host.Example.Lifecycle/Properties/launchSettings.json rename to examples/MinimalLambda.Example.Lifecycle/Properties/launchSettings.json diff --git a/examples/AwsLambda.Host.Example.Lifecycle/appsettings.json b/examples/MinimalLambda.Example.Lifecycle/appsettings.json similarity index 88% rename from examples/AwsLambda.Host.Example.Lifecycle/appsettings.json rename to examples/MinimalLambda.Example.Lifecycle/appsettings.json index 68837917..ae1dc09f 100644 --- a/examples/AwsLambda.Host.Example.Lifecycle/appsettings.json +++ b/examples/MinimalLambda.Example.Lifecycle/appsettings.json @@ -1,5 +1,5 @@ { - "AwsLambdaHost": { + "LambdaHost": { "InvocationCancellationBuffer": "00:00:05" }, "Logging": { diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/Function.cs b/examples/MinimalLambda.Example.OpenTelemetry/Function.cs similarity index 85% rename from examples/AwsLambda.Host.Example.OpenTelemetry/Function.cs rename to examples/MinimalLambda.Example.OpenTelemetry/Function.cs index 582de454..0b67d6a7 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/Function.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/Function.cs @@ -1,6 +1,6 @@ -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; internal static class Function { diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/IService.cs b/examples/MinimalLambda.Example.OpenTelemetry/IService.cs similarity index 71% rename from examples/AwsLambda.Host.Example.OpenTelemetry/IService.cs rename to examples/MinimalLambda.Example.OpenTelemetry/IService.cs index 21c6ea54..a32dede0 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/IService.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/IService.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; internal interface IService { diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/Instrumentation.cs b/examples/MinimalLambda.Example.OpenTelemetry/Instrumentation.cs similarity index 92% rename from examples/AwsLambda.Host.Example.OpenTelemetry/Instrumentation.cs rename to examples/MinimalLambda.Example.OpenTelemetry/Instrumentation.cs index 472e1a55..f314777f 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/Instrumentation.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/Instrumentation.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; /// /// It is recommended to use a custom type to hold references for ActivitySource. This avoids diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/AwsLambda.Host.Example.OpenTelemetry.csproj b/examples/MinimalLambda.Example.OpenTelemetry/MinimalLambda.Example.OpenTelemetry.csproj similarity index 69% rename from examples/AwsLambda.Host.Example.OpenTelemetry/AwsLambda.Host.Example.OpenTelemetry.csproj rename to examples/MinimalLambda.Example.OpenTelemetry/MinimalLambda.Example.OpenTelemetry.csproj index 2c5971f7..14eda7b7 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/AwsLambda.Host.Example.OpenTelemetry.csproj +++ b/examples/MinimalLambda.Example.OpenTelemetry/MinimalLambda.Example.OpenTelemetry.csproj @@ -11,19 +11,19 @@ true true - - $(InterceptorsNamespaces);AwsLambda.Host + + $(InterceptorsNamespaces);MinimalLambda.Generated false - - + + - + diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/Models.cs b/examples/MinimalLambda.Example.OpenTelemetry/Models.cs similarity index 68% rename from examples/AwsLambda.Host.Example.OpenTelemetry/Models.cs rename to examples/MinimalLambda.Example.OpenTelemetry/Models.cs index 1e277d20..df2f7ea8 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/Models.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/Models.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; internal record Request(string Name); diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/NameMetrics.cs b/examples/MinimalLambda.Example.OpenTelemetry/NameMetrics.cs similarity index 90% rename from examples/AwsLambda.Host.Example.OpenTelemetry/NameMetrics.cs rename to examples/MinimalLambda.Example.OpenTelemetry/NameMetrics.cs index 155f1894..c7137102 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/NameMetrics.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/NameMetrics.cs @@ -1,6 +1,6 @@ using System.Diagnostics.Metrics; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; public class NameMetrics { diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/OpenTelemetryRegistrationExtensions.cs b/examples/MinimalLambda.Example.OpenTelemetry/OpenTelemetryRegistrationExtensions.cs similarity index 97% rename from examples/AwsLambda.Host.Example.OpenTelemetry/OpenTelemetryRegistrationExtensions.cs rename to examples/MinimalLambda.Example.OpenTelemetry/OpenTelemetryRegistrationExtensions.cs index da93cfa3..38f56b33 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/OpenTelemetryRegistrationExtensions.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/OpenTelemetryRegistrationExtensions.cs @@ -5,7 +5,7 @@ using OpenTelemetry.Resources; using OpenTelemetry.Trace; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; internal static class OpenTelemetryRegistrationExtensions { diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/Program.cs b/examples/MinimalLambda.Example.OpenTelemetry/Program.cs similarity index 77% rename from examples/AwsLambda.Host.Example.OpenTelemetry/Program.cs rename to examples/MinimalLambda.Example.OpenTelemetry/Program.cs index 8f554e99..bdad4cf1 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/Program.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/Program.cs @@ -1,7 +1,7 @@ -ο»Ώusing AwsLambda.Host.Builder; -using AwsLambda.Host.Example.OpenTelemetry; -using Microsoft.Extensions.DependencyInjection; +ο»Ώusing Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using MinimalLambda.Builder; +using MinimalLambda.Example.OpenTelemetry; var builder = LambdaApplication.CreateBuilder(); diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/Properties/launchSettings.json b/examples/MinimalLambda.Example.OpenTelemetry/Properties/launchSettings.json similarity index 100% rename from examples/AwsLambda.Host.Example.OpenTelemetry/Properties/launchSettings.json rename to examples/MinimalLambda.Example.OpenTelemetry/Properties/launchSettings.json diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/README.md b/examples/MinimalLambda.Example.OpenTelemetry/README.md similarity index 89% rename from examples/AwsLambda.Host.Example.OpenTelemetry/README.md rename to examples/MinimalLambda.Example.OpenTelemetry/README.md index 4f4fd119..948a389e 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/README.md +++ b/examples/MinimalLambda.Example.OpenTelemetry/README.md @@ -1,13 +1,13 @@ -# AwsLambda.Host.Example.OpenTelemetry +# MinimalLambda.Example.OpenTelemetry -> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/aws-lambda-host/)** +> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)** ## Getting Started You may need to CD into this directory before running the following commands. ```bash -cd ./examples/AwsLambda.Host.Example.OpenTelemetry +cd ./examples/MinimalLambda.Example.OpenTelemetry ``` ### Dependencies diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/Service.cs b/examples/MinimalLambda.Example.OpenTelemetry/Service.cs similarity index 91% rename from examples/AwsLambda.Host.Example.OpenTelemetry/Service.cs rename to examples/MinimalLambda.Example.OpenTelemetry/Service.cs index f19461aa..2ff929a5 100644 --- a/examples/AwsLambda.Host.Example.OpenTelemetry/Service.cs +++ b/examples/MinimalLambda.Example.OpenTelemetry/Service.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace AwsLambda.Host.Example.OpenTelemetry; +namespace MinimalLambda.Example.OpenTelemetry; internal class Service(Instrumentation instrumentation, NameMetrics nameMetrics) : IService { diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/docker-compose.yml b/examples/MinimalLambda.Example.OpenTelemetry/docker-compose.yml similarity index 100% rename from examples/AwsLambda.Host.Example.OpenTelemetry/docker-compose.yml rename to examples/MinimalLambda.Example.OpenTelemetry/docker-compose.yml diff --git a/examples/AwsLambda.Host.Example.OpenTelemetry/events/SavedRequests/__DefaultFunction__/Lambda.Host.Example.OpenTelemetry Event.json b/examples/MinimalLambda.Example.OpenTelemetry/events/SavedRequests/__DefaultFunction__/Lambda.Host.Example.OpenTelemetry Event.json similarity index 100% rename from examples/AwsLambda.Host.Example.OpenTelemetry/events/SavedRequests/__DefaultFunction__/Lambda.Host.Example.OpenTelemetry Event.json rename to examples/MinimalLambda.Example.OpenTelemetry/events/SavedRequests/__DefaultFunction__/Lambda.Host.Example.OpenTelemetry Event.json diff --git a/mkdocs.yml b/mkdocs.yml index d8d76c79..54a81bb6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,13 +2,13 @@ # https://github.com/mkdocs/catalog -site_name: AwsLambda.Host +site_name: MinimalLambda site_description: A modern .NET framework for building AWS Lambda functions using familiar .NET patterns. -site_url: https://j-d-ha.github.io/aws-lambda-host/ +site_url: https://j-d-ha.github.io/minimal-lambda/ site_author: Jonas Ha -repo_name: j-d-ha/aws-lambda-host -repo_url: https://github.com/j-d-ha/aws-lambda-host +repo_name: j-d-ha/minimal-lambda +repo_url: https://github.com/j-d-ha/minimal-lambda edit_uri: edit/main/docs/ theme: diff --git a/package-lock.json b/package-lock.json index b6baa331..b934fca6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "aws-lambda-host", + "name": "minimal-lambda", "version": "0.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "aws-lambda-host", + "name": "minimal-lambda", "version": "0.0.7", "devDependencies": { "@commitlint/cli": "^20.1.0", diff --git a/package.json b/package.json index ab996ac5..34bd0ac7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "aws-lambda-host", + "name": "minimal-lambda", "version": "0.0.7", - "description": "AWS Lambda Host - .NET library for running code on AWS Lambda", + "description": "MinimalLambda - ASP.NET Core Minimal API-style patterns for any AWS Lambda trigger", "private": true, "devDependencies": { "@commitlint/cli": "^20.1.0", diff --git a/pyproject.toml b/pyproject.toml index cc09b232..38ba4fa7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] -name = "aws-lambda-host-docs" +name = "minimal-lambda-docs" version = "0.1.0" -description = "mkdocs for aws-lambda-host" +description = "mkdocs for minimal-lambda" requires-python = ">=3.13" dependencies = [ "mkdocs>=1.6.1", diff --git a/scripts/validate-version.sh b/scripts/validate-version.sh index 69779066..33cf0463 100644 --- a/scripts/validate-version.sh +++ b/scripts/validate-version.sh @@ -2,8 +2,8 @@ # Script to validate that a package version doesn't already exist on NuGet -# Get the directory from the first argument, default to src/AwsLambda.Host -DIR="${1:-src/AwsLambda.Host}" +# Get the directory from the first argument, default to src/MinimalLambda +DIR="${1:-src/MinimalLambda}" # Change to the project directory cd "$DIR" || exit 1 diff --git a/src/AwsLambda.Host.Abstractions/GlobalUsings.cs b/src/AwsLambda.Host.Abstractions/GlobalUsings.cs deleted file mode 100644 index 5aaa0584..00000000 --- a/src/AwsLambda.Host.Abstractions/GlobalUsings.cs +++ /dev/null @@ -1,4 +0,0 @@ -global using AwsLambda.Host; -global using AwsLambda.Host.Builder; -global using AwsLambda.Host.Core; -global using AwsLambda.Host.Options; diff --git a/src/AwsLambda.Host.SourceGenerators/AnalyzerReleases.Shipped.md b/src/AwsLambda.Host.SourceGenerators/AnalyzerReleases.Shipped.md deleted file mode 100644 index 53047bfd..00000000 --- a/src/AwsLambda.Host.SourceGenerators/AnalyzerReleases.Shipped.md +++ /dev/null @@ -1,10 +0,0 @@ -## Release 1.0.0 - -### New Rules - - Rule ID | Category | Severity | Notes ----------|------------------------------|----------|----------------------------------- - LH0001 | AwsLambda.Host.Usage | Error | Multiple method calls detected - LH0002 | AwsLambda.Host.Usage | Error | Multiple parameters use attribute - LH0003 | AwsLambda.Host.Usage | Error | Invalid attribute argument - LH0004 | AwsLambda.Host.Configuration | Error | C# language version too low diff --git a/src/AwsLambda.Host.SourceGenerators/Properties/launchSettings.json b/src/AwsLambda.Host.SourceGenerators/Properties/launchSettings.json deleted file mode 100644 index d582ff80..00000000 --- a/src/AwsLambda.Host.SourceGenerators/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "Lambda.Host.SourceGenerators": { - "commandName": "DebugRoslynComponent", - "targetProject": "../../examples/Lambda.Host.Example.HelloWorld/Lambda.Host.Example.HelloWorld.csproj" - } - } -} \ No newline at end of file diff --git a/src/AwsLambda.Host/GlobalUsings.cs b/src/AwsLambda.Host/GlobalUsings.cs deleted file mode 100644 index 9492d0bb..00000000 --- a/src/AwsLambda.Host/GlobalUsings.cs +++ /dev/null @@ -1,4 +0,0 @@ -global using AwsLambda.Host.Builder; -global using AwsLambda.Host.Core; -global using AwsLambda.Host.Options; -global using AwsLambda.Host.Runtime; diff --git a/src/AwsLambda.Host/build/AwsLambda.Host.targets b/src/AwsLambda.Host/build/AwsLambda.Host.targets deleted file mode 100644 index 620088e5..00000000 --- a/src/AwsLambda.Host/build/AwsLambda.Host.targets +++ /dev/null @@ -1,7 +0,0 @@ - - - - $(InterceptorsPreviewNamespaces);AwsLambda.Host.Core.Generated - - - diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/README.md b/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/README.md deleted file mode 100644 index 13e7b1c4..00000000 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/README.md +++ /dev/null @@ -1,145 +0,0 @@ -# AwsLambda.Host.Envelopes.Kafka - -Strongly-typed Kafka event handling for the AwsLambda.Host framework. - -## Overview - -This package provides `KafkaEnvelope`, which extends the base [ -`KafkaEvent`](https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.KafkaEvents/README.md) -class with a generic `Records` collection that deserializes base64-encoded Kafka message values into -strongly-typed objects. Instead of manually decoding and parsing base64 data from `record.Value`, -you -access deserialized payloads directly via `record.ValueContent`. - -| Envelope Class | Base Class | Use Case | -|--------------------|--------------|----------------------------------------------| -| `KafkaEnvelope` | `KafkaEvent` | Kafka event with deserialized message values | - -## Quick Start - -Define your message type and handler: - -```csharp -using Amazon.Lambda.KafkaEvents; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.Kafka; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -var builder = LambdaApplication.CreateBuilder(); -var lambda = builder.Build(); - -// KafkaEnvelope provides access to the Kafka event and deserialized OrderEvent payloads -lambda.MapHandler( - ([Event] KafkaEnvelope envelope, ILogger logger) => - { - foreach (var topic in envelope.Records) - { - logger.LogInformation("Processing {Count} records from topic: {Topic}", topic.Value.Count, topic.Key); - - foreach (var record in topic.Value) - { - logger.LogInformation( - "Order ID: {OrderId}, Amount: {Amount}", - record.ValueContent?.OrderId, - record.ValueContent?.Amount - ); - } - } - } -); - -await lambda.RunAsync(); - -// Your message payload - will be deserialized from base64-encoded Kafka message value -internal record OrderEvent(string OrderId, decimal Amount, DateTime Timestamp); -``` - -## Custom Envelopes - -To implement custom deserialization logic, extend `KafkaEnvelopeBase` and override the -`ExtractPayload` method: - -```csharp -// Example: Custom XML deserialization -public sealed class KafkaXmlEnvelope : KafkaEnvelopeBase -{ - private static readonly XmlSerializer Serializer = new(typeof(T)); - - public override void ExtractPayload(EnvelopeOptions options) - { - foreach (var topic in Records) - { - foreach (var record in topic.Value) - { - using var reader = new StreamReader( - record.Value, - Encoding.UTF8, - leaveOpen: true - ); - var base64String = reader.ReadToEnd(); - var xmlBytes = Convert.FromBase64String(base64String); - using var xmlReader = XmlReader.Create( - new MemoryStream(xmlBytes), - options.XmlReaderSettings - ); - record.ValueContent = (T)Serializer.Deserialize(xmlReader)!; - } - } - } -} -``` - -This pattern allows you to support multiple serialization formats while maintaining the same -envelope interface. - -## AOT Support - -When using .NET Native AOT, register both the envelope and payload types in your -`JsonSerializerContext`: - -```csharp -[JsonSerializable(typeof(KafkaEnvelope))] -[JsonSerializable(typeof(OrderEvent))] -internal partial class SerializerContext : JsonSerializerContext; -``` - -Register the serializer and configure envelope options to use the context: - -```csharp -builder.Services.AddLambdaSerializerWithContext(); - -builder.Services.ConfigureEnvelopeOptions(options => -{ - options.JsonOptions.TypeInfoResolver = SerializerContext.Default; -}); -``` - -> [!NOTE] -> The context must be registered as the type resolver for both the envelope options and the Lambda -> serializer because the Lambda event and envelope payload are deserialized at different steps: the -> Lambda serializer deserializes the raw event, and the envelope options deserialize the envelope -> content into your payload type. - -## Other Packages - -Additional packages in the aws-lambda-host framework for abstractions, observability, and event -source handling. - -| Package | NuGet | Downloads | -|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | - -## License - -This project is licensed under the MIT License. See [LICENSE](../../LICENSE) for details. diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/README.md b/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/README.md deleted file mode 100644 index 301942fd..00000000 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/README.md +++ /dev/null @@ -1,136 +0,0 @@ -# AwsLambda.Host.Envelopes.Kinesis - -Strongly-typed Kinesis event handling for the AwsLambda.Host framework. - -## Overview - -This package provides `KinesisEnvelope`, which extends the base [ -`KinesisEvent`](https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.KinesisEvents/README.md) -class with a generic `Records` collection that deserializes Kinesis data streams into strongly-typed -objects. Instead of manually decoding and parsing base64 data from `record.Kinesis.Data`, you access -deserialized payloads directly via `record.Kinesis.DataContent`. - -| Envelope Class | Base Class | Use Case | -|----------------------|----------------|------------------------------------------------| -| `KinesisEnvelope` | `KinesisEvent` | Kinesis event with deserialized stream records | - -## Quick Start - -Define your record type and handler: - -```csharp -using Amazon.Lambda.KinesisEvents; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.Kinesis; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -var builder = LambdaApplication.CreateBuilder(); -var lambda = builder.Build(); - -// KinesisEnvelope provides access to the Kinesis event and deserialized StreamRecord payloads -lambda.MapHandler( - ([Event] KinesisEnvelope envelope, ILogger logger) => - { - foreach (var record in envelope.Records) - { - logger.LogInformation( - "Stream Record: {EventName} at {Timestamp}", - record.Kinesis.DataContent?.EventName, - record.Kinesis.DataContent?.Timestamp - ); - } - } -); - -await lambda.RunAsync(); - -// Your record payload - will be deserialized from base64-encoded Kinesis data stream -internal record StreamRecord(string EventName, DateTime Timestamp); -``` - -## Custom Envelopes - -To implement custom deserialization logic, extend `KinesisEnvelopeBase` and override the -`ExtractPayload` method: - -```csharp -// Example: Custom XML deserialization -public sealed class KinesisXmlEnvelope : KinesisEnvelopeBase -{ - private static readonly XmlSerializer Serializer = new(typeof(T)); - - public override void ExtractPayload(EnvelopeOptions options) - { - foreach (var record in Records) - { - using var reader = new StreamReader( - record.Kinesis.Data, - Encoding.UTF8, - leaveOpen: true - ); - var base64String = reader.ReadToEnd(); - var xmlBytes = Convert.FromBase64String(base64String); - using var xmlReader = XmlReader.Create( - new MemoryStream(xmlBytes), - options.XmlReaderSettings - ); - record.Kinesis.DataContent = (T)Serializer.Deserialize(xmlReader)!; - } - } -} -``` - -This pattern allows you to support multiple serialization formats while maintaining the same -envelope interface. - -## AOT Support - -When using .NET Native AOT, register both the envelope and payload types in your -`JsonSerializerContext`: - -```csharp -[JsonSerializable(typeof(KinesisEnvelope))] -[JsonSerializable(typeof(StreamRecord))] -internal partial class SerializerContext : JsonSerializerContext; -``` - -Register the serializer and configure envelope options to use the context: - -```csharp -builder.Services.AddLambdaSerializerWithContext(); - -builder.Services.ConfigureEnvelopeOptions(options => -{ - options.JsonOptions.TypeInfoResolver = SerializerContext.Default; -}); -``` - -> [!NOTE] -> The context must be registered as the type resolver for both the envelope options and the Lambda -> serializer because the Lambda event and envelope payload are deserialized at different steps: the -> Lambda serializer deserializes the raw event, and the envelope options deserialize the envelope -> content into your payload type. - -## Other Packages - -Additional packages in the aws-lambda-host framework for abstractions, observability, and event -source handling. - -| Package | NuGet | Downloads | -|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | - -## License - -This project is licensed under the MIT License. See [LICENSE](../../LICENSE) for details. diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/README.md b/src/Envelopes/AwsLambda.Host.Envelopes.Sns/README.md deleted file mode 100644 index a76400f7..00000000 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# AwsLambda.Host.Envelopes.Sns - -Strongly-typed SNS event handling for the AwsLambda.Host framework. - -## Overview - -This package provides `SnsEnvelope`, which extends the base [ -`SNSEvent`](https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.SNSEvents/README.md) -class with strongly-typed `Records` collection that deserializes message bodies into strongly-typed -objects. Instead of manually parsing JSON from `record.Sns.Message`, you access deserialized -payloads directly via `record.Sns.MessageContent`. - -| Envelope Class | Base Class | Use Case | -|------------------|------------|--------------------------------------------| -| `SnsEnvelope` | `SNSEvent` | SNS event with deserialized message bodies | - -## Quick Start - -Define your message type and handler: - -```csharp -using Amazon.Lambda.SNSEvents; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.Sns; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -var builder = LambdaApplication.CreateBuilder(); -var lambda = builder.Build(); - -// SnsEnvelope provides access to the SNS event and deserialized Message payloads -lambda.MapHandler( - ([Event] SnsEnvelope envelope, ILogger logger) => - { - foreach (var record in envelope.Records) - { - logger.LogInformation("Message: {Content}", record.Sns.MessageContent?.Content); - } - } -); - -await lambda.RunAsync(); - -// Your message payload - will be deserialized from SNS message body -internal record Message(string Content); -``` - -## Custom Envelopes - -To implement custom deserialization logic, extend `SnsEnvelopeBase` and override the -`ExtractPayload` method: - -```csharp -// Example: Custom XML deserialization -public sealed class SnsXmlEnvelope : SnsEnvelopeBase -{ - private static readonly XmlSerializer Serializer = new(typeof(T)); - - public override void ExtractPayload(EnvelopeOptions options) - { - foreach (var record in Records) - { - using var stringReader = new StringReader(record.Sns.Message); - using var xmlReader = XmlReader.Create(stringReader, options.XmlReaderSettings); - record.Sns.MessageContent = (T)Serializer.Deserialize(xmlReader)!; - } - } -} -``` - -This pattern allows you to support multiple serialization formats while maintaining the same -envelope interface. - -## AOT Support - -When using .NET Native AOT, register both the envelope and payload types in your -`JsonSerializerContext`: - -```csharp -[JsonSerializable(typeof(SnsEnvelope))] -[JsonSerializable(typeof(Message))] -internal partial class SerializerContext : JsonSerializerContext; -``` - -Register the serializer and configure envelope options to use the context: - -```csharp -builder.Services.AddLambdaSerializerWithContext(); - -builder.Services.ConfigureEnvelopeOptions(options => -{ - options.JsonOptions.TypeInfoResolver = SerializerContext.Default; -}); -``` - -> [!NOTE] -> The context must be registered as the type resolver for both the envelope options and the Lambda -> serializer because the Lambda event and envelope payload are deserialized at different steps: the -> Lambda serializer deserializes the raw event, and the envelope options deserialize the envelope -> content into your payload type. - -## Other Packages - -Additional packages in the aws-lambda-host framework for abstractions, observability, and event -source handling. - -| Package | NuGet | Downloads | -|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | - -## License - -This project is licensed under the MIT License. See [LICENSE](../../LICENSE) for details. \ No newline at end of file diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbRequestEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbRequestEnvelope.cs similarity index 90% rename from src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbRequestEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.Alb/AlbRequestEnvelope.cs index 0fac56d7..d6cfecac 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbRequestEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbRequestEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Alb; +namespace MinimalLambda.Envelopes.Alb; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbRequestEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbRequestEnvelopeBase.cs similarity index 93% rename from src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbRequestEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.Alb/AlbRequestEnvelopeBase.cs index 39265374..7f19c476 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbRequestEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbRequestEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.ApplicationLoadBalancerEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Alb; +namespace MinimalLambda.Envelopes.Alb; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbResponseEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbResponseEnvelope.cs similarity index 90% rename from src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbResponseEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.Alb/AlbResponseEnvelope.cs index 345a2c49..cd8c1951 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbResponseEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbResponseEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Alb; +namespace MinimalLambda.Envelopes.Alb; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbResponseEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbResponseEnvelopeBase.cs similarity index 93% rename from src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbResponseEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.Alb/AlbResponseEnvelopeBase.cs index f1897f0c..8d427723 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AlbResponseEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/AlbResponseEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.ApplicationLoadBalancerEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Alb; +namespace MinimalLambda.Envelopes.Alb; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AwsLambda.Host.Envelopes.Alb.csproj b/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj similarity index 75% rename from src/Envelopes/AwsLambda.Host.Envelopes.Alb/AwsLambda.Host.Envelopes.Alb.csproj rename to src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj index 7081e2bb..2da41e1e 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/AwsLambda.Host.Envelopes.Alb.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Envelopes.Alb - Strongly-typed Application Load Balancer Models for AWS Lambda + MinimalLambda.Envelopes.Alb + Strongly-typed Application Load Balancer event envelopes README.md @@ -19,7 +19,7 @@ - + diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/README.md b/src/Envelopes/MinimalLambda.Envelopes.Alb/README.md similarity index 52% rename from src/Envelopes/AwsLambda.Host.Envelopes.Alb/README.md rename to src/Envelopes/MinimalLambda.Envelopes.Alb/README.md index 4f8bcc36..bceb4685 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Alb/README.md +++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/README.md @@ -1,6 +1,6 @@ -# AwsLambda.Host.Envelopes.Alb +# MinimalLambda.Envelopes.Alb -Strongly-typed Application Load Balancer event handling for the AwsLambda.Host framework. +Strongly-typed Application Load Balancer event handling for the MinimalLambda framework. ## Overview @@ -28,8 +28,8 @@ Define your request and response types, then create a handler: ```csharp using System; using System.Collections.Generic; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.Alb; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.Alb; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -126,22 +126,22 @@ builder.Services.ConfigureEnvelopeOptions(options => ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayRequestEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayRequestEnvelope.cs similarity index 90% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayRequestEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayRequestEnvelope.cs index c8a4532c..8b14f676 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayRequestEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayRequestEnvelope.cs @@ -1,7 +1,7 @@ ο»Ώusing System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayRequestEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayRequestEnvelopeBase.cs similarity index 92% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayRequestEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayRequestEnvelopeBase.cs index 28eeeab4..1a57f2d5 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayRequestEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayRequestEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.APIGatewayEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayResponseEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayResponseEnvelope.cs similarity index 89% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayResponseEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayResponseEnvelope.cs index a9f19929..c580251d 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayResponseEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayResponseEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayResponseEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayResponseEnvelopeBase.cs similarity index 92% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayResponseEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayResponseEnvelopeBase.cs index 69f64f99..03b9d24e 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayResponseEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayResponseEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.APIGatewayEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelope.cs similarity index 90% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelope.cs index be8de69b..195a0ad3 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelope.cs @@ -1,7 +1,7 @@ ο»Ώusing System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelopeBase.cs similarity index 92% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelopeBase.cs index 4c24202f..337cb313 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2RequestEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.APIGatewayEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelope.cs similarity index 90% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelope.cs index a7c69936..e239514e 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelopeBase.cs similarity index 92% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelopeBase.cs index 19be6e57..45e4d2b1 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/ApiGatewayV2ResponseEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.APIGatewayEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.ApiGateway; +namespace MinimalLambda.Envelopes.ApiGateway; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/AwsLambda.Host.Envelopes.ApiGateway.csproj b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj similarity index 76% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/AwsLambda.Host.Envelopes.ApiGateway.csproj rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj index 7bc6309d..98c6f1f4 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/AwsLambda.Host.Envelopes.ApiGateway.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Envelopes.ApiGateway - Strongly-typed API Gateway Models AWS Lambda + MinimalLambda.Envelopes.ApiGateway + Strongly-typed API Gateway event envelopes README.md @@ -19,7 +19,7 @@ - + diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/README.md b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/README.md similarity index 55% rename from src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/README.md rename to src/Envelopes/MinimalLambda.Envelopes.ApiGateway/README.md index 7d5c30f4..005090a0 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.ApiGateway/README.md +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/README.md @@ -1,6 +1,6 @@ -# AwsLambda.Host.Envelopes.ApiGateway +# MinimalLambda.Envelopes.ApiGateway -Strongly-typed API Gateway event handling for the AwsLambda.Host framework. +Strongly-typed API Gateway event handling for the MinimalLambda framework. ## Overview @@ -29,8 +29,8 @@ Define your request and response types, then create a handler: ```csharp using System; using System.Collections.Generic; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.ApiGateway; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.ApiGateway; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -130,22 +130,22 @@ builder.Services.ConfigureEnvelopeOptions(options => ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelope.cs similarity index 92% rename from src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelope.cs index c08de574..623243e0 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelope.cs @@ -1,6 +1,6 @@ -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.CloudWatchLogs; +namespace MinimalLambda.Envelopes.CloudWatchLogs; /// /// Processes CloudWatch Logs events where log messages are plain strings that do not require diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeBase.cs similarity index 97% rename from src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeBase.cs index 3904c139..9b425d69 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeBase.cs @@ -1,9 +1,9 @@ using System.Text.Json; using System.Text.Json.Serialization; using Amazon.Lambda.CloudWatchLogsEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.CloudWatchLogs; +namespace MinimalLambda.Envelopes.CloudWatchLogs; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeT.cs b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeT.cs similarity index 94% rename from src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeT.cs rename to src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeT.cs index 31070546..511ea957 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeT.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/CloudWatchLogsEnvelopeT.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.CloudWatchLogs; +namespace MinimalLambda.Envelopes.CloudWatchLogs; /// /// Processes CloudWatch Logs events and deserializes each log message into a strongly typed diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/AwsLambda.Host.Envelopes.CloudWatchLogs.csproj b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj similarity index 75% rename from src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/AwsLambda.Host.Envelopes.CloudWatchLogs.csproj rename to src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj index 15598099..48307564 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/AwsLambda.Host.Envelopes.CloudWatchLogs.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Envelopes.CloudWatchLogs - Strongly-typed CloudWatch Logs Models AWS Lambda + MinimalLambda.Envelopes.CloudWatchLogs + Strongly-typed CloudWatch Logs event envelopes README.md @@ -19,7 +19,7 @@ - + diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/README.md b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/README.md similarity index 50% rename from src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/README.md rename to src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/README.md index 58d703a6..2e007f85 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/README.md +++ b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/README.md @@ -1,6 +1,6 @@ -# AwsLambda.Host.Envelopes.CloudWatchLogs +# MinimalLambda.Envelopes.CloudWatchLogs -Strongly-typed CloudWatch Logs event handling for the AwsLambda.Host framework. +Strongly-typed CloudWatch Logs event handling for the MinimalLambda framework. ## Overview @@ -21,8 +21,8 @@ Define your log data type and handler: ```csharp using System.Text.Json; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.CloudWatchLogs; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.CloudWatchLogs; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -119,22 +119,22 @@ builder.Services.ConfigureEnvelopeOptions(options => ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/SAMPLE_EVENTS.md b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/SAMPLE_EVENTS.md similarity index 100% rename from src/Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/SAMPLE_EVENTS.md rename to src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/SAMPLE_EVENTS.md diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/KafkaEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.Kafka/KafkaEnvelope.cs similarity index 93% rename from src/Envelopes/AwsLambda.Host.Envelopes.Kafka/KafkaEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.Kafka/KafkaEnvelope.cs index cba7aee2..f6df08b0 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/KafkaEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Kafka/KafkaEnvelope.cs @@ -1,8 +1,8 @@ using System.Text; using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Kafka; +namespace MinimalLambda.Envelopes.Kafka; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/KafkaEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.Kafka/KafkaEnvelopeBase.cs similarity index 93% rename from src/Envelopes/AwsLambda.Host.Envelopes.Kafka/KafkaEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.Kafka/KafkaEnvelopeBase.cs index f5621eb6..96c7e22c 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/KafkaEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Kafka/KafkaEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.KafkaEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Kafka; +namespace MinimalLambda.Envelopes.Kafka; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/AwsLambda.Host.Envelopes.Kafka.csproj b/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj similarity index 72% rename from src/Envelopes/AwsLambda.Host.Envelopes.Kafka/AwsLambda.Host.Envelopes.Kafka.csproj rename to src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj index 9fc88fc7..69172b80 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kafka/AwsLambda.Host.Envelopes.Kafka.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj @@ -8,9 +8,10 @@ true true - AwsLambda.Host.Envelopes.Kafka - Strongly-typed Kafka Models AWS Lambda + MinimalLambda.Envelopes.Kafka + Strongly-typed Kafka event envelopes README.md + MinimalLambda.Envelopes.Kafka @@ -19,7 +20,7 @@ - + diff --git a/src/Envelopes/MinimalLambda.Envelopes.Kafka/README.md b/src/Envelopes/MinimalLambda.Envelopes.Kafka/README.md new file mode 100644 index 00000000..b4bded24 --- /dev/null +++ b/src/Envelopes/MinimalLambda.Envelopes.Kafka/README.md @@ -0,0 +1,145 @@ +# MinimalLambda.Envelopes.Kafka + +Strongly-typed Kafka event handling for the MinimalLambda framework. + +## Overview + +This package provides `KafkaEnvelope`, which extends the base [ +`KafkaEvent`](https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.KafkaEvents/README.md) +class with a generic `Records` collection that deserializes base64-encoded Kafka message values into +strongly-typed objects. Instead of manually decoding and parsing base64 data from `record.Value`, +you +access deserialized payloads directly via `record.ValueContent`. + +| Envelope Class | Base Class | Use Case | +|--------------------|--------------|----------------------------------------------| +| `KafkaEnvelope` | `KafkaEvent` | Kafka event with deserialized message values | + +## Quick Start + +Define your message type and handler: + +```csharp +using Amazon.Lambda.KafkaEvents; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.Kafka; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +var builder = LambdaApplication.CreateBuilder(); +var lambda = builder.Build(); + +// KafkaEnvelope provides access to the Kafka event and deserialized OrderEvent payloads +lambda.MapHandler( + ([Event] KafkaEnvelope envelope, ILogger logger) => + { + foreach (var topic in envelope.Records) + { + logger.LogInformation("Processing {Count} records from topic: {Topic}", topic.Value.Count, topic.Key); + + foreach (var record in topic.Value) + { + logger.LogInformation( + "Order ID: {OrderId}, Amount: {Amount}", + record.ValueContent?.OrderId, + record.ValueContent?.Amount + ); + } + } + } +); + +await lambda.RunAsync(); + +// Your message payload - will be deserialized from base64-encoded Kafka message value +internal record OrderEvent(string OrderId, decimal Amount, DateTime Timestamp); +``` + +## Custom Envelopes + +To implement custom deserialization logic, extend `KafkaEnvelopeBase` and override the +`ExtractPayload` method: + +```csharp +// Example: Custom XML deserialization +public sealed class KafkaXmlEnvelope : KafkaEnvelopeBase +{ + private static readonly XmlSerializer Serializer = new(typeof(T)); + + public override void ExtractPayload(EnvelopeOptions options) + { + foreach (var topic in Records) + { + foreach (var record in topic.Value) + { + using var reader = new StreamReader( + record.Value, + Encoding.UTF8, + leaveOpen: true + ); + var base64String = reader.ReadToEnd(); + var xmlBytes = Convert.FromBase64String(base64String); + using var xmlReader = XmlReader.Create( + new MemoryStream(xmlBytes), + options.XmlReaderSettings + ); + record.ValueContent = (T)Serializer.Deserialize(xmlReader)!; + } + } + } +} +``` + +This pattern allows you to support multiple serialization formats while maintaining the same +envelope interface. + +## AOT Support + +When using .NET Native AOT, register both the envelope and payload types in your +`JsonSerializerContext`: + +```csharp +[JsonSerializable(typeof(KafkaEnvelope))] +[JsonSerializable(typeof(OrderEvent))] +internal partial class SerializerContext : JsonSerializerContext; +``` + +Register the serializer and configure envelope options to use the context: + +```csharp +builder.Services.AddLambdaSerializerWithContext(); + +builder.Services.ConfigureEnvelopeOptions(options => +{ + options.JsonOptions.TypeInfoResolver = SerializerContext.Default; +}); +``` + +> [!NOTE] +> The context must be registered as the type resolver for both the envelope options and the Lambda +> serializer because the Lambda event and envelope payload are deserialized at different steps: the +> Lambda serializer deserializes the raw event, and the envelope options deserialize the envelope +> content into your payload type. + +## Other Packages + +Additional packages in the minimal-lambda framework for abstractions, observability, and event +source handling. + +| Package | NuGet | Downloads | +|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | + +## License + +This project is licensed under the MIT License. See [LICENSE](../../LICENSE) for details. diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/KinesisEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/KinesisEnvelope.cs similarity index 93% rename from src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/KinesisEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.Kinesis/KinesisEnvelope.cs index 035a652a..6e1ede6b 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/KinesisEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/KinesisEnvelope.cs @@ -1,8 +1,8 @@ using System.Text; using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Kinesis; +namespace MinimalLambda.Envelopes.Kinesis; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/KinesisEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/KinesisEnvelopeBase.cs similarity index 95% rename from src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/KinesisEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.Kinesis/KinesisEnvelopeBase.cs index be36a5b1..7abb816c 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/KinesisEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/KinesisEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.KinesisEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Kinesis; +namespace MinimalLambda.Envelopes.Kinesis; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/AwsLambda.Host.Envelopes.Kinesis.csproj b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj similarity index 76% rename from src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/AwsLambda.Host.Envelopes.Kinesis.csproj rename to src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj index 4ba4f910..c97d519f 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Kinesis/AwsLambda.Host.Envelopes.Kinesis.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Envelopes.Kinesis - Strongly-typed Kinesis Models AWS Lambda + MinimalLambda.Envelopes.Kinesis + Strongly-typed Kinesis event envelopes README.md @@ -19,7 +19,7 @@ - + diff --git a/src/Envelopes/MinimalLambda.Envelopes.Kinesis/README.md b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/README.md new file mode 100644 index 00000000..a33b19be --- /dev/null +++ b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/README.md @@ -0,0 +1,136 @@ +# MinimalLambda.Envelopes.Kinesis + +Strongly-typed Kinesis event handling for the MinimalLambda framework. + +## Overview + +This package provides `KinesisEnvelope`, which extends the base [ +`KinesisEvent`](https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.KinesisEvents/README.md) +class with a generic `Records` collection that deserializes Kinesis data streams into strongly-typed +objects. Instead of manually decoding and parsing base64 data from `record.Kinesis.Data`, you access +deserialized payloads directly via `record.Kinesis.DataContent`. + +| Envelope Class | Base Class | Use Case | +|----------------------|----------------|------------------------------------------------| +| `KinesisEnvelope` | `KinesisEvent` | Kinesis event with deserialized stream records | + +## Quick Start + +Define your record type and handler: + +```csharp +using Amazon.Lambda.KinesisEvents; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.Kinesis; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +var builder = LambdaApplication.CreateBuilder(); +var lambda = builder.Build(); + +// KinesisEnvelope provides access to the Kinesis event and deserialized StreamRecord payloads +lambda.MapHandler( + ([Event] KinesisEnvelope envelope, ILogger logger) => + { + foreach (var record in envelope.Records) + { + logger.LogInformation( + "Stream Record: {EventName} at {Timestamp}", + record.Kinesis.DataContent?.EventName, + record.Kinesis.DataContent?.Timestamp + ); + } + } +); + +await lambda.RunAsync(); + +// Your record payload - will be deserialized from base64-encoded Kinesis data stream +internal record StreamRecord(string EventName, DateTime Timestamp); +``` + +## Custom Envelopes + +To implement custom deserialization logic, extend `KinesisEnvelopeBase` and override the +`ExtractPayload` method: + +```csharp +// Example: Custom XML deserialization +public sealed class KinesisXmlEnvelope : KinesisEnvelopeBase +{ + private static readonly XmlSerializer Serializer = new(typeof(T)); + + public override void ExtractPayload(EnvelopeOptions options) + { + foreach (var record in Records) + { + using var reader = new StreamReader( + record.Kinesis.Data, + Encoding.UTF8, + leaveOpen: true + ); + var base64String = reader.ReadToEnd(); + var xmlBytes = Convert.FromBase64String(base64String); + using var xmlReader = XmlReader.Create( + new MemoryStream(xmlBytes), + options.XmlReaderSettings + ); + record.Kinesis.DataContent = (T)Serializer.Deserialize(xmlReader)!; + } + } +} +``` + +This pattern allows you to support multiple serialization formats while maintaining the same +envelope interface. + +## AOT Support + +When using .NET Native AOT, register both the envelope and payload types in your +`JsonSerializerContext`: + +```csharp +[JsonSerializable(typeof(KinesisEnvelope))] +[JsonSerializable(typeof(StreamRecord))] +internal partial class SerializerContext : JsonSerializerContext; +``` + +Register the serializer and configure envelope options to use the context: + +```csharp +builder.Services.AddLambdaSerializerWithContext(); + +builder.Services.ConfigureEnvelopeOptions(options => +{ + options.JsonOptions.TypeInfoResolver = SerializerContext.Default; +}); +``` + +> [!NOTE] +> The context must be registered as the type resolver for both the envelope options and the Lambda +> serializer because the Lambda event and envelope payload are deserialized at different steps: the +> Lambda serializer deserializes the raw event, and the envelope options deserialize the envelope +> content into your payload type. + +## Other Packages + +Additional packages in the minimal-lambda framework for abstractions, observability, and event +source handling. + +| Package | NuGet | Downloads | +|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | + +## License + +This project is licensed under the MIT License. See [LICENSE](../../LICENSE) for details. diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelope.cs similarity index 91% rename from src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelope.cs index cd4e15f0..ed2eaba4 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.KinesisFirehose; +namespace MinimalLambda.Envelopes.KinesisFirehose; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelopeBase.cs similarity index 93% rename from src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelopeBase.cs index 06edf95f..ab11f563 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseEventEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.KinesisFirehoseEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.KinesisFirehose; +namespace MinimalLambda.Envelopes.KinesisFirehose; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelope.cs similarity index 91% rename from src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelope.cs index 8078fc35..ce105648 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.KinesisFirehose; +namespace MinimalLambda.Envelopes.KinesisFirehose; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelopeBase.cs similarity index 94% rename from src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelopeBase.cs index 04bf91f3..09261419 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/KinesisFirehoseResponseEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.KinesisFirehoseEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.KinesisFirehose; +namespace MinimalLambda.Envelopes.KinesisFirehose; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/AwsLambda.Host.Envelopes.KinesisFirehose.csproj b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj similarity index 75% rename from src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/AwsLambda.Host.Envelopes.KinesisFirehose.csproj rename to src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj index a9e98f6f..e11173c5 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/AwsLambda.Host.Envelopes.KinesisFirehose.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Envelopes.KinesisFirehose - Strongly-typed Kinesis Firehose Models AWS Lambda + MinimalLambda.Envelopes.KinesisFirehose + Strongly-typed Kinesis Firehose event envelopes README.md @@ -19,7 +19,7 @@ - + diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/README.md b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/README.md similarity index 56% rename from src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/README.md rename to src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/README.md index afc7e180..1440b7a8 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/README.md +++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/README.md @@ -1,6 +1,6 @@ -# AwsLambda.Host.Envelopes.KinesisFirehose +# MinimalLambda.Envelopes.KinesisFirehose -Strongly-typed Kinesis Firehose event handling for the AwsLambda.Host framework. +Strongly-typed Kinesis Firehose event handling for the MinimalLambda framework. ## Overview @@ -27,8 +27,8 @@ Define your data types, then create a transformation handler: ```csharp using System; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.KinesisFirehose; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.KinesisFirehose; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -149,22 +149,22 @@ builder.Services.ConfigureEnvelopeOptions(options => ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/AwsLambda.Host.Envelopes.Sns.csproj b/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj similarity index 77% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sns/AwsLambda.Host.Envelopes.Sns.csproj rename to src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj index e3144b16..969d1454 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/AwsLambda.Host.Envelopes.Sns.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Envelopes.Sns - Strongly-typed SNS Models for AWS Lambda + MinimalLambda.Envelopes.Sns + Strongly-typed SNS event envelopes README.md @@ -19,7 +19,7 @@ - + diff --git a/src/Envelopes/MinimalLambda.Envelopes.Sns/README.md b/src/Envelopes/MinimalLambda.Envelopes.Sns/README.md new file mode 100644 index 00000000..bc9907a0 --- /dev/null +++ b/src/Envelopes/MinimalLambda.Envelopes.Sns/README.md @@ -0,0 +1,123 @@ +# MinimalLambda.Envelopes.Sns + +Strongly-typed SNS event handling for the MinimalLambda framework. + +## Overview + +This package provides `SnsEnvelope`, which extends the base [ +`SNSEvent`](https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.SNSEvents/README.md) +class with strongly-typed `Records` collection that deserializes message bodies into strongly-typed +objects. Instead of manually parsing JSON from `record.Sns.Message`, you access deserialized +payloads directly via `record.Sns.MessageContent`. + +| Envelope Class | Base Class | Use Case | +|------------------|------------|--------------------------------------------| +| `SnsEnvelope` | `SNSEvent` | SNS event with deserialized message bodies | + +## Quick Start + +Define your message type and handler: + +```csharp +using Amazon.Lambda.SNSEvents; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.Sns; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +var builder = LambdaApplication.CreateBuilder(); +var lambda = builder.Build(); + +// SnsEnvelope provides access to the SNS event and deserialized Message payloads +lambda.MapHandler( + ([Event] SnsEnvelope envelope, ILogger logger) => + { + foreach (var record in envelope.Records) + { + logger.LogInformation("Message: {Content}", record.Sns.MessageContent?.Content); + } + } +); + +await lambda.RunAsync(); + +// Your message payload - will be deserialized from SNS message body +internal record Message(string Content); +``` + +## Custom Envelopes + +To implement custom deserialization logic, extend `SnsEnvelopeBase` and override the +`ExtractPayload` method: + +```csharp +// Example: Custom XML deserialization +public sealed class SnsXmlEnvelope : SnsEnvelopeBase +{ + private static readonly XmlSerializer Serializer = new(typeof(T)); + + public override void ExtractPayload(EnvelopeOptions options) + { + foreach (var record in Records) + { + using var stringReader = new StringReader(record.Sns.Message); + using var xmlReader = XmlReader.Create(stringReader, options.XmlReaderSettings); + record.Sns.MessageContent = (T)Serializer.Deserialize(xmlReader)!; + } + } +} +``` + +This pattern allows you to support multiple serialization formats while maintaining the same +envelope interface. + +## AOT Support + +When using .NET Native AOT, register both the envelope and payload types in your +`JsonSerializerContext`: + +```csharp +[JsonSerializable(typeof(SnsEnvelope))] +[JsonSerializable(typeof(Message))] +internal partial class SerializerContext : JsonSerializerContext; +``` + +Register the serializer and configure envelope options to use the context: + +```csharp +builder.Services.AddLambdaSerializerWithContext(); + +builder.Services.ConfigureEnvelopeOptions(options => +{ + options.JsonOptions.TypeInfoResolver = SerializerContext.Default; +}); +``` + +> [!NOTE] +> The context must be registered as the type resolver for both the envelope options and the Lambda +> serializer because the Lambda event and envelope payload are deserialized at different steps: the +> Lambda serializer deserializes the raw event, and the envelope options deserialize the envelope +> content into your payload type. + +## Other Packages + +Additional packages in the minimal-lambda framework for abstractions, observability, and event +source handling. + +| Package | NuGet | Downloads | +|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | + +## License + +This project is licensed under the MIT License. See [LICENSE](../../LICENSE) for details. \ No newline at end of file diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/SnsEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.Sns/SnsEnvelope.cs similarity index 91% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sns/SnsEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.Sns/SnsEnvelope.cs index 3018a7a3..560ea277 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/SnsEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Sns/SnsEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Sns; +namespace MinimalLambda.Envelopes.Sns; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/SnsEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.Sns/SnsEnvelopeBase.cs similarity index 94% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sns/SnsEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.Sns/SnsEnvelopeBase.cs index 8193610f..d0b3b7c5 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sns/SnsEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Sns/SnsEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.SNSEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Sns; +namespace MinimalLambda.Envelopes.Sns; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/AwsLambda.Host.Envelopes.Sqs.csproj b/src/Envelopes/MinimalLambda.Envelopes.Sqs/MinimalLambda.Envelopes.Sqs.csproj similarity index 70% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sqs/AwsLambda.Host.Envelopes.Sqs.csproj rename to src/Envelopes/MinimalLambda.Envelopes.Sqs/MinimalLambda.Envelopes.Sqs.csproj index 3371cceb..a5b7b798 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/AwsLambda.Host.Envelopes.Sqs.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Sqs/MinimalLambda.Envelopes.Sqs.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Envelopes.Sqs - Strongly-typed SQS Models AWS Lambda + MinimalLambda.Envelopes.Sqs + Strongly-typed SQS event envelopes README.md @@ -19,8 +19,8 @@ - - + + diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/README.md b/src/Envelopes/MinimalLambda.Envelopes.Sqs/README.md similarity index 55% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sqs/README.md rename to src/Envelopes/MinimalLambda.Envelopes.Sqs/README.md index 9cce6ef0..ecc47dfb 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/README.md +++ b/src/Envelopes/MinimalLambda.Envelopes.Sqs/README.md @@ -1,6 +1,6 @@ -# AwsLambda.Host.Envelopes.Sqs +# MinimalLambda.Envelopes.Sqs -Strongly-typed SQS event handling for the AwsLambda.Host framework. +Strongly-typed SQS event handling for the MinimalLambda framework. ## Overview @@ -23,8 +23,8 @@ Define your message type and handler: ```csharp using Amazon.Lambda.SQSEvents; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Envelopes.Sqs; +using MinimalLambda.Builder; +using MinimalLambda.Envelopes.Sqs; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -145,22 +145,22 @@ Lambda function processes messages from that queue. ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsEnvelope.cs similarity index 91% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsEnvelope.cs index d2f603c2..d4087a7d 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsEnvelope.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Sqs; +namespace MinimalLambda.Envelopes.Sqs; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsEnvelopeBase.cs b/src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsEnvelopeBase.cs similarity index 93% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsEnvelopeBase.cs rename to src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsEnvelopeBase.cs index a9ee016e..ec665e11 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsEnvelopeBase.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsEnvelopeBase.cs @@ -1,8 +1,8 @@ using System.Text.Json.Serialization; using Amazon.Lambda.SQSEvents; -using AwsLambda.Host.Options; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Sqs; +namespace MinimalLambda.Envelopes.Sqs; /// /// diff --git a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsSnsEnvelope.cs b/src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsSnsEnvelope.cs similarity index 95% rename from src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsSnsEnvelope.cs rename to src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsSnsEnvelope.cs index ffa88e72..95e6bcd3 100644 --- a/src/Envelopes/AwsLambda.Host.Envelopes.Sqs/SqsSnsEnvelope.cs +++ b/src/Envelopes/MinimalLambda.Envelopes.Sqs/SqsSnsEnvelope.cs @@ -1,8 +1,8 @@ using System.Text.Json; -using AwsLambda.Host.Envelopes.Sns; -using AwsLambda.Host.Options; +using MinimalLambda.Envelopes.Sns; +using MinimalLambda.Options; -namespace AwsLambda.Host.Envelopes.Sqs; +namespace MinimalLambda.Envelopes.Sqs; /// /// diff --git a/src/Envelopes/README.md b/src/Envelopes/README.md index 046c5be0..17ff5c74 100644 --- a/src/Envelopes/README.md +++ b/src/Envelopes/README.md @@ -3,7 +3,7 @@ Envelopes extend AWS Lambda event types with strongly-typed payload handling, making it easier to work with JSON (or other formats) in Lambda function handlers. -> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/aws-lambda-host/)** +> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)** ## Overview @@ -24,14 +24,14 @@ IDE support and compile-time type checking. | Lambda Event Type | Package | NuGet | Downloads | |--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| SQS | [**AwsLambda.Host.Envelopes.Sqs**](./AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| SQS (SNS-to-SQS Subscription) | [**AwsLambda.Host.Envelopes.Sqs**](./AwsLambda.Host.Envelopes.Sqs/README.md#sqssnsenvelope---sns-to-sqs-subscription-pattern) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| API Gateway (REST/HTTP/WebSocket) | [**AwsLambda.Host.Envelopes.ApiGateway**](./AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| SNS | [**AwsLambda.Host.Envelopes.Sns**](./AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| Kinesis Data Streams | [**AwsLambda.Host.Envelopes.Kinesis**](./AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| Kinesis Data Firehose Transformation | [**AwsLambda.Host.Envelopes.KinesisFirehose**](./AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| Kafka (MSK or self-managed) | [**AwsLambda.Host.Envelopes.Kafka**](./AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| CloudWatch Logs | [**AwsLambda.Host.Envelopes.CloudWatchLogs**](./AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| Application Load Balancer | [**AwsLambda.Host.Envelopes.Alb**](./AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| SQS | [**MinimalLambda.Envelopes.Sqs**](./MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| SQS (SNS-to-SQS Subscription) | [**MinimalLambda.Envelopes.Sqs**](./MinimalLambda.Envelopes.Sqs/README.md#sqssnsenvelope---sns-to-sqs-subscription-pattern) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| API Gateway (REST/HTTP/WebSocket) | [**MinimalLambda.Envelopes.ApiGateway**](./MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| SNS | [**MinimalLambda.Envelopes.Sns**](./MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| Kinesis Data Streams | [**MinimalLambda.Envelopes.Kinesis**](./MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| Kinesis Data Firehose Transformation | [**MinimalLambda.Envelopes.KinesisFirehose**](./MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| Kafka (MSK or self-managed) | [**MinimalLambda.Envelopes.Kafka**](./MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| CloudWatch Logs | [**MinimalLambda.Envelopes.CloudWatchLogs**](./MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| Application Load Balancer | [**MinimalLambda.Envelopes.Alb**](./MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | Each package has detailed documentation in its own README file. diff --git a/src/AwsLambda.Host.Abstractions/Builders/ILambdaInvocationBuilder.cs b/src/MinimalLambda.Abstractions/Builders/ILambdaInvocationBuilder.cs similarity index 98% rename from src/AwsLambda.Host.Abstractions/Builders/ILambdaInvocationBuilder.cs rename to src/MinimalLambda.Abstractions/Builders/ILambdaInvocationBuilder.cs index 3ce5b616..085b7935 100644 --- a/src/AwsLambda.Host.Abstractions/Builders/ILambdaInvocationBuilder.cs +++ b/src/MinimalLambda.Abstractions/Builders/ILambdaInvocationBuilder.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Builder for composing Lambda invocation handlers with middleware. /// diff --git a/src/AwsLambda.Host.Abstractions/Builders/ILambdaOnInitBuilder.cs b/src/MinimalLambda.Abstractions/Builders/ILambdaOnInitBuilder.cs similarity index 98% rename from src/AwsLambda.Host.Abstractions/Builders/ILambdaOnInitBuilder.cs rename to src/MinimalLambda.Abstractions/Builders/ILambdaOnInitBuilder.cs index aa68f7b9..f86f1e70 100644 --- a/src/AwsLambda.Host.Abstractions/Builders/ILambdaOnInitBuilder.cs +++ b/src/MinimalLambda.Abstractions/Builders/ILambdaOnInitBuilder.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Builder for composing Lambda init handlers that execute during the Init phase. /// diff --git a/src/AwsLambda.Host.Abstractions/Builders/ILambdaOnShutdownBuilder.cs b/src/MinimalLambda.Abstractions/Builders/ILambdaOnShutdownBuilder.cs similarity index 98% rename from src/AwsLambda.Host.Abstractions/Builders/ILambdaOnShutdownBuilder.cs rename to src/MinimalLambda.Abstractions/Builders/ILambdaOnShutdownBuilder.cs index ea264dc9..736c6b53 100644 --- a/src/AwsLambda.Host.Abstractions/Builders/ILambdaOnShutdownBuilder.cs +++ b/src/MinimalLambda.Abstractions/Builders/ILambdaOnShutdownBuilder.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Builder for composing Lambda shutdown handlers that execute during the Shutdown phase. /// diff --git a/src/AwsLambda.Host.Abstractions/Core/ILambdaCancellationFactory.cs b/src/MinimalLambda.Abstractions/Core/ILambdaCancellationFactory.cs similarity index 97% rename from src/AwsLambda.Host.Abstractions/Core/ILambdaCancellationFactory.cs rename to src/MinimalLambda.Abstractions/Core/ILambdaCancellationFactory.cs index f1bf7ab1..a976575f 100644 --- a/src/AwsLambda.Host.Abstractions/Core/ILambdaCancellationFactory.cs +++ b/src/MinimalLambda.Abstractions/Core/ILambdaCancellationFactory.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides a factory for creating cancellation token sources configured for AWS Lambda diff --git a/src/AwsLambda.Host.Abstractions/Core/ILambdaHostContext.cs b/src/MinimalLambda.Abstractions/Core/ILambdaHostContext.cs similarity index 97% rename from src/AwsLambda.Host.Abstractions/Core/ILambdaHostContext.cs rename to src/MinimalLambda.Abstractions/Core/ILambdaHostContext.cs index 544c42e7..3a7a2484 100644 --- a/src/AwsLambda.Host.Abstractions/Core/ILambdaHostContext.cs +++ b/src/MinimalLambda.Abstractions/Core/ILambdaHostContext.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Encapsulates the information about a Lambda invocation. It extends diff --git a/src/AwsLambda.Host.Abstractions/Core/ILambdaHostContextAccessor.cs b/src/MinimalLambda.Abstractions/Core/ILambdaHostContextAccessor.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Core/ILambdaHostContextAccessor.cs rename to src/MinimalLambda.Abstractions/Core/ILambdaHostContextAccessor.cs index fb88b40e..a1e02320 100644 --- a/src/AwsLambda.Host.Abstractions/Core/ILambdaHostContextAccessor.cs +++ b/src/MinimalLambda.Abstractions/Core/ILambdaHostContextAccessor.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides access to the for the current Lambda diff --git a/src/AwsLambda.Host.Abstractions/Delegates/LambdaInitDelegate.cs b/src/MinimalLambda.Abstractions/Delegates/LambdaInitDelegate.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Delegates/LambdaInitDelegate.cs rename to src/MinimalLambda.Abstractions/Delegates/LambdaInitDelegate.cs index f51633fe..8f55cd8a 100644 --- a/src/AwsLambda.Host.Abstractions/Delegates/LambdaInitDelegate.cs +++ b/src/MinimalLambda.Abstractions/Delegates/LambdaInitDelegate.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host; +namespace MinimalLambda; /// /// A callback delegate invoked during the AWS Lambda Function Init phase, before any handler diff --git a/src/AwsLambda.Host.Abstractions/Delegates/LambdaInvocationDelegate.cs b/src/MinimalLambda.Abstractions/Delegates/LambdaInvocationDelegate.cs similarity index 98% rename from src/AwsLambda.Host.Abstractions/Delegates/LambdaInvocationDelegate.cs rename to src/MinimalLambda.Abstractions/Delegates/LambdaInvocationDelegate.cs index 604d1638..95baad43 100644 --- a/src/AwsLambda.Host.Abstractions/Delegates/LambdaInvocationDelegate.cs +++ b/src/MinimalLambda.Abstractions/Delegates/LambdaInvocationDelegate.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host; +namespace MinimalLambda; /// A delegate that represents an asynchronous handler for AWS Lambda invocations. /// diff --git a/src/AwsLambda.Host.Abstractions/Delegates/LambdaShutdownDelegate.cs b/src/MinimalLambda.Abstractions/Delegates/LambdaShutdownDelegate.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Delegates/LambdaShutdownDelegate.cs rename to src/MinimalLambda.Abstractions/Delegates/LambdaShutdownDelegate.cs index 214714fc..881215aa 100644 --- a/src/AwsLambda.Host.Abstractions/Delegates/LambdaShutdownDelegate.cs +++ b/src/MinimalLambda.Abstractions/Delegates/LambdaShutdownDelegate.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host; +namespace MinimalLambda; /// A callback delegate invoked during the AWS Lambda Function Shutdown phase. /// A scoped for resolving dependencies. diff --git a/src/AwsLambda.Host.Abstractions/Envelopes/IRequestEnvelope.cs b/src/MinimalLambda.Abstractions/Envelopes/IRequestEnvelope.cs similarity index 97% rename from src/AwsLambda.Host.Abstractions/Envelopes/IRequestEnvelope.cs rename to src/MinimalLambda.Abstractions/Envelopes/IRequestEnvelope.cs index b442f2c2..1fed632f 100644 --- a/src/AwsLambda.Host.Abstractions/Envelopes/IRequestEnvelope.cs +++ b/src/MinimalLambda.Abstractions/Envelopes/IRequestEnvelope.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Envelopes; +namespace MinimalLambda.Envelopes; /// Defines a contract for extracting and deserializing incoming Lambda event payloads. /// diff --git a/src/AwsLambda.Host.Abstractions/Envelopes/IResponseEnvelope.cs b/src/MinimalLambda.Abstractions/Envelopes/IResponseEnvelope.cs similarity index 97% rename from src/AwsLambda.Host.Abstractions/Envelopes/IResponseEnvelope.cs rename to src/MinimalLambda.Abstractions/Envelopes/IResponseEnvelope.cs index 72fcd889..fa7654c3 100644 --- a/src/AwsLambda.Host.Abstractions/Envelopes/IResponseEnvelope.cs +++ b/src/MinimalLambda.Abstractions/Envelopes/IResponseEnvelope.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Envelopes; +namespace MinimalLambda.Envelopes; /// /// Defines a contract for serializing and packing handler results into Lambda response diff --git a/src/AwsLambda.Host.Abstractions/Features/IEventFeature.cs b/src/MinimalLambda.Abstractions/Features/IEventFeature.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Features/IEventFeature.cs rename to src/MinimalLambda.Abstractions/Features/IEventFeature.cs index 4d6f9804..a29fa75d 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IEventFeature.cs +++ b/src/MinimalLambda.Abstractions/Features/IEventFeature.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Provides access to the deserialized Lambda invocation event. /// diff --git a/src/AwsLambda.Host.Abstractions/Features/IEventFeatureProviderFactory.cs b/src/MinimalLambda.Abstractions/Features/IEventFeatureProviderFactory.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Features/IEventFeatureProviderFactory.cs rename to src/MinimalLambda.Abstractions/Features/IEventFeatureProviderFactory.cs index 5d56b2fc..8f4a1c28 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IEventFeatureProviderFactory.cs +++ b/src/MinimalLambda.Abstractions/Features/IEventFeatureProviderFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Creates feature providers for Lambda event deserialization. /// diff --git a/src/AwsLambda.Host.Abstractions/Features/IEventFeatureT.cs b/src/MinimalLambda.Abstractions/Features/IEventFeatureT.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Features/IEventFeatureT.cs rename to src/MinimalLambda.Abstractions/Features/IEventFeatureT.cs index ea94e733..82963dcd 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IEventFeatureT.cs +++ b/src/MinimalLambda.Abstractions/Features/IEventFeatureT.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Provides access to the deserialized Lambda invocation event of a specific type. /// The type of the event object. diff --git a/src/AwsLambda.Host.Abstractions/Features/IFeatureCollection.cs b/src/MinimalLambda.Abstractions/Features/IFeatureCollection.cs similarity index 97% rename from src/AwsLambda.Host.Abstractions/Features/IFeatureCollection.cs rename to src/MinimalLambda.Abstractions/Features/IFeatureCollection.cs index b48a7e81..99509b9f 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IFeatureCollection.cs +++ b/src/MinimalLambda.Abstractions/Features/IFeatureCollection.cs @@ -6,7 +6,7 @@ // See THIRD-PARTY-LICENSES.txt file in the project root or visit // https://github.com/Azure/azure-functions-dotnet-worker/blob/2.51.0/LICENSE -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// A type-keyed collection of features available during a Lambda invocation. /// diff --git a/src/AwsLambda.Host.Abstractions/Features/IFeatureProvider.cs b/src/MinimalLambda.Abstractions/Features/IFeatureProvider.cs similarity index 98% rename from src/AwsLambda.Host.Abstractions/Features/IFeatureProvider.cs rename to src/MinimalLambda.Abstractions/Features/IFeatureProvider.cs index 940de008..d4b9df89 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IFeatureProvider.cs +++ b/src/MinimalLambda.Abstractions/Features/IFeatureProvider.cs @@ -6,7 +6,7 @@ // See THIRD-PARTY-LICENSES.txt file in the project root or visit // https://github.com/Azure/azure-functions-dotnet-worker/blob/2.51.0/LICENSE -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Provides a mechanism to create feature instances on demand. /// diff --git a/src/AwsLambda.Host.Abstractions/Features/IInvocationDataFeature.cs b/src/MinimalLambda.Abstractions/Features/IInvocationDataFeature.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Features/IInvocationDataFeature.cs rename to src/MinimalLambda.Abstractions/Features/IInvocationDataFeature.cs index 4bf00b5e..b8b11f93 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IInvocationDataFeature.cs +++ b/src/MinimalLambda.Abstractions/Features/IInvocationDataFeature.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides access to the invocation event and response data for a Lambda function diff --git a/src/AwsLambda.Host.Abstractions/Features/IResponseFeature.cs b/src/MinimalLambda.Abstractions/Features/IResponseFeature.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Features/IResponseFeature.cs rename to src/MinimalLambda.Abstractions/Features/IResponseFeature.cs index e9b85a58..c441ee14 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IResponseFeature.cs +++ b/src/MinimalLambda.Abstractions/Features/IResponseFeature.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Provides access to the Lambda invocation response. /// diff --git a/src/AwsLambda.Host.Abstractions/Features/IResponseFeatureProviderFactory.cs b/src/MinimalLambda.Abstractions/Features/IResponseFeatureProviderFactory.cs similarity index 96% rename from src/AwsLambda.Host.Abstractions/Features/IResponseFeatureProviderFactory.cs rename to src/MinimalLambda.Abstractions/Features/IResponseFeatureProviderFactory.cs index d742f0bd..6444d715 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IResponseFeatureProviderFactory.cs +++ b/src/MinimalLambda.Abstractions/Features/IResponseFeatureProviderFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Creates feature providers for Lambda response serialization. /// diff --git a/src/AwsLambda.Host.Abstractions/Features/IResponseFeatureT.cs b/src/MinimalLambda.Abstractions/Features/IResponseFeatureT.cs similarity index 97% rename from src/AwsLambda.Host.Abstractions/Features/IResponseFeatureT.cs rename to src/MinimalLambda.Abstractions/Features/IResponseFeatureT.cs index f417a3c0..9bb16b13 100644 --- a/src/AwsLambda.Host.Abstractions/Features/IResponseFeatureT.cs +++ b/src/MinimalLambda.Abstractions/Features/IResponseFeatureT.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Provides type-safe access to the Lambda invocation response of a specific type. /// The type of the response object. diff --git a/src/MinimalLambda.Abstractions/GlobalUsings.cs b/src/MinimalLambda.Abstractions/GlobalUsings.cs new file mode 100644 index 00000000..3847e967 --- /dev/null +++ b/src/MinimalLambda.Abstractions/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using MinimalLambda.Builder; +global using MinimalLambda.Options; diff --git a/src/AwsLambda.Host.Abstractions/AwsLambda.Host.Abstractions.csproj b/src/MinimalLambda.Abstractions/MinimalLambda.Abstractions.csproj similarity index 85% rename from src/AwsLambda.Host.Abstractions/AwsLambda.Host.Abstractions.csproj rename to src/MinimalLambda.Abstractions/MinimalLambda.Abstractions.csproj index f89f3a8e..a31489df 100644 --- a/src/AwsLambda.Host.Abstractions/AwsLambda.Host.Abstractions.csproj +++ b/src/MinimalLambda.Abstractions/MinimalLambda.Abstractions.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host.Abstractions - Abstractions for .NET Host for AWS Lambda + MinimalLambda.Abstractions + Core abstractions for MinimalLambda README.md diff --git a/src/AwsLambda.Host.Abstractions/Options/EnvelopeOptions.cs b/src/MinimalLambda.Abstractions/Options/EnvelopeOptions.cs similarity index 98% rename from src/AwsLambda.Host.Abstractions/Options/EnvelopeOptions.cs rename to src/MinimalLambda.Abstractions/Options/EnvelopeOptions.cs index 8dc0cc2e..c25fba1a 100644 --- a/src/AwsLambda.Host.Abstractions/Options/EnvelopeOptions.cs +++ b/src/MinimalLambda.Abstractions/Options/EnvelopeOptions.cs @@ -3,9 +3,9 @@ using System.Xml; using Amazon.Lambda.Serialization.SystemTextJson; using Amazon.Lambda.Serialization.SystemTextJson.Converters; -using AwsLambda.Host.Envelopes; +using MinimalLambda.Envelopes; -namespace AwsLambda.Host.Options; +namespace MinimalLambda.Options; /// Options for configuring envelope payload serialization and deserialization. /// diff --git a/src/AwsLambda.Host.Abstractions/README.md b/src/MinimalLambda.Abstractions/README.md similarity index 59% rename from src/AwsLambda.Host.Abstractions/README.md rename to src/MinimalLambda.Abstractions/README.md index 34b5b227..808ad6fc 100644 --- a/src/AwsLambda.Host.Abstractions/README.md +++ b/src/MinimalLambda.Abstractions/README.md @@ -1,12 +1,12 @@ -# AwsLambda.Host.Abstractions +# MinimalLambda.Abstractions -Core interfaces and abstractions for the aws-lambda-host framework. +Core interfaces and abstractions for the minimal-lambda framework. -> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/aws-lambda-host/)** +> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)** ## Overview -Core interfaces and delegates that define the AwsLambda.Host framework contract. This package +Core interfaces and delegates that define the MinimalLambda framework contract. This package provides: - **Handler Abstractions**: Interfaces for Lambda request and response handling across different @@ -16,7 +16,7 @@ provides: - **Dependency Injection**: Service container and lifetime management interfaces - **Extension Points**: Contracts for custom integrations and framework extensions -This package is typically used implicitly by [AwsLambda.Host](../AwsLambda.Host/README.md), but is +This package is typically used implicitly by [MinimalLambda](../MinimalLambda/README.md), but is essential if you're building custom integrations, middleware components, or extensions to the framework. @@ -25,13 +25,13 @@ framework. Install via NuGet: ```bash -dotnet add package AwsLambda.Host.Abstractions +dotnet add package MinimalLambda.Abstractions ``` Or specify a version: ```bash -dotnet add package AwsLambda.Host.Abstractions --version +dotnet add package MinimalLambda.Abstractions --version ``` Ensure your project uses C# 11 or later: @@ -46,7 +46,7 @@ Ensure your project uses C# 11 or later: > [!NOTE] > This package is typically included automatically when you use -> [AwsLambda.Host](../AwsLambda.Host/README.md). Direct installation is only necessary when +> [MinimalLambda](../MinimalLambda/README.md). Direct installation is only necessary when > building custom integrations or extensions. ## Core Abstractions @@ -109,7 +109,7 @@ LambdaApplication.CreateBuilder() ``` This design separates concerns between request/response handling, initialization, and lifecycle -cleanup. See [AwsLambda.Host](../AwsLambda.Host/README.md) for detailed usage examples and the +cleanup. See [MinimalLambda](../MinimalLambda/README.md) for detailed usage examples and the complete builder API. ### ILambdaHostContext @@ -201,26 +201,26 @@ The abstractions represent three Lambda execution phases: - **Invocation** – `LambdaInvocationDelegate` runs for each event - **Shutdown** – `LambdaShutdownDelegate` runs once before termination -For implementation details and examples, see [AwsLambda.Host](../AwsLambda.Host/README.md). +For implementation details and examples, see [MinimalLambda](../MinimalLambda/README.md). ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../Envelopes/AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../Envelopes/AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../Envelopes/AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../Envelopes/AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../Envelopes/AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../Envelopes/AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../Envelopes/MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../Envelopes/MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../Envelopes/MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../Envelopes/MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../Envelopes/MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../Envelopes/MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../Envelopes/MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/AwsLambda.Host.OpenTelemetry/LambdaOpenTelemetryAdapters.cs b/src/MinimalLambda.OpenTelemetry/LambdaOpenTelemetryAdapters.cs similarity index 99% rename from src/AwsLambda.Host.OpenTelemetry/LambdaOpenTelemetryAdapters.cs rename to src/MinimalLambda.OpenTelemetry/LambdaOpenTelemetryAdapters.cs index 3a900d83..f7663547 100644 --- a/src/AwsLambda.Host.OpenTelemetry/LambdaOpenTelemetryAdapters.cs +++ b/src/MinimalLambda.OpenTelemetry/LambdaOpenTelemetryAdapters.cs @@ -1,6 +1,5 @@ using Amazon.Lambda.Core; -using AwsLambda.Host; -using AwsLambda.Host.Core; +using MinimalLambda; using OpenTelemetry.Instrumentation.AWSLambda; using OpenTelemetry.Trace; diff --git a/src/AwsLambda.Host.OpenTelemetry/MiddlewareOpenTelemetryExtensions.cs b/src/MinimalLambda.OpenTelemetry/MiddlewareOpenTelemetryExtensions.cs similarity index 97% rename from src/AwsLambda.Host.OpenTelemetry/MiddlewareOpenTelemetryExtensions.cs rename to src/MinimalLambda.OpenTelemetry/MiddlewareOpenTelemetryExtensions.cs index 995dd42c..15e67768 100644 --- a/src/AwsLambda.Host.OpenTelemetry/MiddlewareOpenTelemetryExtensions.cs +++ b/src/MinimalLambda.OpenTelemetry/MiddlewareOpenTelemetryExtensions.cs @@ -1,9 +1,8 @@ -using AwsLambda.Host.Core; using Microsoft.Extensions.DependencyInjection; using OpenTelemetry.Instrumentation.AWSLambda; using OpenTelemetry.Trace; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// /// Provides extension methods for enabling OpenTelemetry tracing in the Lambda invocation diff --git a/src/AwsLambda.Host.OpenTelemetry/AwsLambda.Host.OpenTelemetry.csproj b/src/MinimalLambda.OpenTelemetry/MinimalLambda.OpenTelemetry.csproj similarity index 76% rename from src/AwsLambda.Host.OpenTelemetry/AwsLambda.Host.OpenTelemetry.csproj rename to src/MinimalLambda.OpenTelemetry/MinimalLambda.OpenTelemetry.csproj index a91244fa..a34277e2 100644 --- a/src/AwsLambda.Host.OpenTelemetry/AwsLambda.Host.OpenTelemetry.csproj +++ b/src/MinimalLambda.OpenTelemetry/MinimalLambda.OpenTelemetry.csproj @@ -8,12 +8,12 @@ true true - AwsLambda.Host.OpenTelemetry - OpenTelemetry for .NET Host for AWS Lambda + MinimalLambda.OpenTelemetry + OpenTelemetry integration for MinimalLambda README.md - + diff --git a/src/AwsLambda.Host.OpenTelemetry/OnShutdownOpenTelemetryExtensions.cs b/src/MinimalLambda.OpenTelemetry/OnShutdownOpenTelemetryExtensions.cs similarity index 98% rename from src/AwsLambda.Host.OpenTelemetry/OnShutdownOpenTelemetryExtensions.cs rename to src/MinimalLambda.OpenTelemetry/OnShutdownOpenTelemetryExtensions.cs index c82452f2..3ce38533 100644 --- a/src/AwsLambda.Host.OpenTelemetry/OnShutdownOpenTelemetryExtensions.cs +++ b/src/MinimalLambda.OpenTelemetry/OnShutdownOpenTelemetryExtensions.cs @@ -4,7 +4,7 @@ using OpenTelemetry.Metrics; using OpenTelemetry.Trace; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// /// Extension methods for configuring OpenTelemetry force flush behavior during Lambda @@ -12,7 +12,7 @@ namespace AwsLambda.Host.Builder; /// public static class OnShutdownOpenTelemetryExtensions { - private const string LogCategory = "AwsLambda.Host.OpenTelemetry"; + private const string LogCategory = "MinimalLambda.OpenTelemetry"; extension(ILambdaOnShutdownBuilder application) { diff --git a/src/AwsLambda.Host.OpenTelemetry/README.md b/src/MinimalLambda.OpenTelemetry/README.md similarity index 61% rename from src/AwsLambda.Host.OpenTelemetry/README.md rename to src/MinimalLambda.OpenTelemetry/README.md index 6fad3b23..c5b17082 100644 --- a/src/AwsLambda.Host.OpenTelemetry/README.md +++ b/src/MinimalLambda.OpenTelemetry/README.md @@ -1,12 +1,12 @@ -# AwsLambda.Host.OpenTelemetry +# MinimalLambda.OpenTelemetry OpenTelemetry integration for distributed tracing and observability in AWS Lambda functions. -> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/aws-lambda-host/)** +> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)** ## Overview -An extension package for the [AwsLambda.Host](../AwsLambda.Host/README.md) framework that provides +An extension package for the [MinimalLambda](../MinimalLambda/README.md) framework that provides comprehensive observability integration. This package enables: - **Distributed Tracing**: Automatic span creation and context propagation for Lambda invocations @@ -20,25 +20,25 @@ comprehensive observability integration. This package enables: error tracking > [!NOTE] -> Requires AwsLambda.Host – this package extends that framework and cannot be used +> Requires MinimalLambda – this package extends that framework and cannot be used > standalone. Configure exporters to send traces and metrics to your observability backend (e.g., > Datadog, New Relic, Jaeger, CloudWatch). ## Installation -**This package requires [AwsLambda.Host](../AwsLambda.Host/README.md) to be installed and working +**This package requires [MinimalLambda](../MinimalLambda/README.md) to be installed and working in your project.** It is an extension package and cannot function standalone. First, install the core framework: ```bash -dotnet add package AwsLambda.Host +dotnet add package MinimalLambda ``` Then install this OpenTelemetry extension: ```bash -dotnet add package AwsLambda.Host.OpenTelemetry +dotnet add package MinimalLambda.OpenTelemetry ``` Ensure your project uses C# 11 or later: @@ -69,7 +69,7 @@ for your specific observability backend and instrumentation needs. Set up OpenTelemetry with the AWS Lambda instrumentation: ```csharp -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using OpenTelemetry.Instrumentation.AWSLambda; @@ -217,7 +217,7 @@ lambda.OnShutdownFlushMeter(); ## Example Project A complete, runnable example with Docker Compose setup is available in -[examples/AwsLambda.Host.Example.OpenTelemetry](../../examples/AwsLambda.Host.Example.OpenTelemetry/). +[examples/MinimalLambda.Example.OpenTelemetry](../../examples/MinimalLambda.Example.OpenTelemetry/). The example demonstrates: @@ -238,27 +238,27 @@ The example demonstrates: - [OpenTelemetry Instrumentation AWSLambda](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/tree/main/src/OpenTelemetry.Instrumentation.AWSLambda) – Source for the AWSLambda instrumentation -- [Full Project Documentation](https://github.com/j-d-ha/aws-lambda-host/wiki) – Comprehensive +- [Full Project Documentation](https://github.com/j-d-ha/minimal-lambda/wiki) – Comprehensive guides and patterns ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../Envelopes/AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../Envelopes/AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../Envelopes/AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../Envelopes/AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../Envelopes/AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../Envelopes/AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../Envelopes/MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../Envelopes/MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../Envelopes/MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../Envelopes/MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../Envelopes/MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../Envelopes/MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../Envelopes/MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/MinimalLambda.SourceGenerators/AnalyzerReleases.Shipped.md b/src/MinimalLambda.SourceGenerators/AnalyzerReleases.Shipped.md new file mode 100644 index 00000000..6c52df40 --- /dev/null +++ b/src/MinimalLambda.SourceGenerators/AnalyzerReleases.Shipped.md @@ -0,0 +1,10 @@ +## Release 1.0.0 + +### New Rules + + Rule ID | Category | Severity | Notes +---------|------------------------------|----------|----------------------------------- + LH0001 | MinimalLambda.Usage | Error | Multiple method calls detected + LH0002 | MinimalLambda.Usage | Error | Multiple parameters use attribute + LH0003 | MinimalLambda.Usage | Error | Invalid attribute argument + LH0004 | MinimalLambda.Configuration | Error | C# language version too low diff --git a/src/AwsLambda.Host.SourceGenerators/AnalyzerReleases.Unshipped.md b/src/MinimalLambda.SourceGenerators/AnalyzerReleases.Unshipped.md similarity index 69% rename from src/AwsLambda.Host.SourceGenerators/AnalyzerReleases.Unshipped.md rename to src/MinimalLambda.SourceGenerators/AnalyzerReleases.Unshipped.md index a4c46e3b..805230ad 100644 --- a/src/AwsLambda.Host.SourceGenerators/AnalyzerReleases.Unshipped.md +++ b/src/MinimalLambda.SourceGenerators/AnalyzerReleases.Unshipped.md @@ -2,4 +2,4 @@ Rule ID | Category | Severity | Notes ---------|------------------------------|----------|----------------------------------- - LH0001 | AwsLambda.Host.Usage | Error | Multiple method calls detected \ No newline at end of file + LH0001 | MinimalLambda.Usage | Error | Multiple method calls detected \ No newline at end of file diff --git a/src/AwsLambda.Host.SourceGenerators/Diagnostics/DiagnosticGenerator.cs b/src/MinimalLambda.SourceGenerators/Diagnostics/DiagnosticGenerator.cs similarity index 94% rename from src/AwsLambda.Host.SourceGenerators/Diagnostics/DiagnosticGenerator.cs rename to src/MinimalLambda.SourceGenerators/Diagnostics/DiagnosticGenerator.cs index 3af20531..703aef3a 100644 --- a/src/AwsLambda.Host.SourceGenerators/Diagnostics/DiagnosticGenerator.cs +++ b/src/MinimalLambda.SourceGenerators/Diagnostics/DiagnosticGenerator.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; -using AwsLambda.Host.SourceGenerators.Models; -using AwsLambda.Host.SourceGenerators.Types; using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class DiagnosticGenerator { diff --git a/src/AwsLambda.Host.SourceGenerators/Diagnostics/Diagnostics.cs b/src/MinimalLambda.SourceGenerators/Diagnostics/Diagnostics.cs similarity index 78% rename from src/AwsLambda.Host.SourceGenerators/Diagnostics/Diagnostics.cs rename to src/MinimalLambda.SourceGenerators/Diagnostics/Diagnostics.cs index 09a11819..31c9ac07 100644 --- a/src/AwsLambda.Host.SourceGenerators/Diagnostics/Diagnostics.cs +++ b/src/MinimalLambda.SourceGenerators/Diagnostics/Diagnostics.cs @@ -1,11 +1,11 @@ using Microsoft.CodeAnalysis; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class Diagnostics { - private const string UsageCategory = "AwsLambda.Host.Usage"; - private const string ConfigurationCategory = "AwsLambda.Host.Configuration"; + private const string UsageCategory = "MinimalLambda.Usage"; + private const string ConfigurationCategory = "MinimalLambda.Configuration"; internal static readonly DiagnosticDescriptor MultipleParametersUseAttribute = new( "LH0002", @@ -28,7 +28,7 @@ internal static class Diagnostics public static readonly DiagnosticDescriptor CSharpVersionTooLow = new( "LH0004", "C# language version too low", - "AwsLambda.Host requires C# 11 or newer (or LanguageVersion=default with a modern SDK). " + "MinimalLambda requires C# 11 or newer (or LanguageVersion=default with a modern SDK). " + "Set latest or enable preview features.", ConfigurationCategory, DiagnosticSeverity.Error, diff --git a/src/AwsLambda.Host.SourceGenerators/Extensions/DelegateInfoExtensions.cs b/src/MinimalLambda.SourceGenerators/Extensions/DelegateInfoExtensions.cs similarity index 93% rename from src/AwsLambda.Host.SourceGenerators/Extensions/DelegateInfoExtensions.cs rename to src/MinimalLambda.SourceGenerators/Extensions/DelegateInfoExtensions.cs index ef2c7838..62c2d14b 100644 --- a/src/AwsLambda.Host.SourceGenerators/Extensions/DelegateInfoExtensions.cs +++ b/src/MinimalLambda.SourceGenerators/Extensions/DelegateInfoExtensions.cs @@ -1,8 +1,8 @@ using System.Linq; using System.Text; -using AwsLambda.Host.SourceGenerators.Models; +using MinimalLambda.SourceGenerators.Models; -namespace AwsLambda.Host.SourceGenerators.Extensions; +namespace MinimalLambda.SourceGenerators.Extensions; internal static class DelegateInfoExtensions { diff --git a/src/AwsLambda.Host.SourceGenerators/Extensions/SyntaxExtensions.cs b/src/MinimalLambda.SourceGenerators/Extensions/SyntaxExtensions.cs similarity index 94% rename from src/AwsLambda.Host.SourceGenerators/Extensions/SyntaxExtensions.cs rename to src/MinimalLambda.SourceGenerators/Extensions/SyntaxExtensions.cs index 0be4dd6d..79ac3c52 100644 --- a/src/AwsLambda.Host.SourceGenerators/Extensions/SyntaxExtensions.cs +++ b/src/MinimalLambda.SourceGenerators/Extensions/SyntaxExtensions.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class SyntaxExtensions { diff --git a/src/AwsLambda.Host.SourceGenerators/Extensions/TypeExtractorExtensions.cs b/src/MinimalLambda.SourceGenerators/Extensions/TypeExtractorExtensions.cs similarity index 92% rename from src/AwsLambda.Host.SourceGenerators/Extensions/TypeExtractorExtensions.cs rename to src/MinimalLambda.SourceGenerators/Extensions/TypeExtractorExtensions.cs index cae38984..36a218e6 100644 --- a/src/AwsLambda.Host.SourceGenerators/Extensions/TypeExtractorExtensions.cs +++ b/src/MinimalLambda.SourceGenerators/Extensions/TypeExtractorExtensions.cs @@ -1,7 +1,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace AwsLambda.Host.SourceGenerators.Extensions; +namespace MinimalLambda.SourceGenerators.Extensions; internal static class TypeExtractorExtensions { diff --git a/src/AwsLambda.Host.SourceGenerators/Extensions/TypeSymbolExtensions.cs b/src/MinimalLambda.SourceGenerators/Extensions/TypeSymbolExtensions.cs similarity index 92% rename from src/AwsLambda.Host.SourceGenerators/Extensions/TypeSymbolExtensions.cs rename to src/MinimalLambda.SourceGenerators/Extensions/TypeSymbolExtensions.cs index c7e77fb0..5dec2f61 100644 --- a/src/AwsLambda.Host.SourceGenerators/Extensions/TypeSymbolExtensions.cs +++ b/src/MinimalLambda.SourceGenerators/Extensions/TypeSymbolExtensions.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class TypeSymbolExtensions { diff --git a/src/AwsLambda.Host.SourceGenerators/GeneratorConstants.cs b/src/MinimalLambda.SourceGenerators/GeneratorConstants.cs similarity index 89% rename from src/AwsLambda.Host.SourceGenerators/GeneratorConstants.cs rename to src/MinimalLambda.SourceGenerators/GeneratorConstants.cs index 96cebe0b..7c64ce10 100644 --- a/src/AwsLambda.Host.SourceGenerators/GeneratorConstants.cs +++ b/src/MinimalLambda.SourceGenerators/GeneratorConstants.cs @@ -1,11 +1,11 @@ -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; /// Constants for common .NET and AWS Lambda types used in source generation. internal static class TypeConstants { internal const string ILambdaContext = "global::Amazon.Lambda.Core.ILambdaContext"; - internal const string ILambdaHostContext = "global::AwsLambda.Host.Core.ILambdaHostContext"; + internal const string ILambdaHostContext = "global::MinimalLambda.ILambdaHostContext"; internal const string CancellationToken = "global::System.Threading.CancellationToken"; @@ -29,7 +29,7 @@ internal static class TypeConstants /// Constants for attribute names used in source generation. internal static class AttributeConstants { - internal const string EventAttribute = "AwsLambda.Host.Builder.EventAttribute"; + internal const string EventAttribute = "MinimalLambda.Builder.EventAttribute"; internal const string FromKeyedService = "Microsoft.Extensions.DependencyInjection.FromKeyedServicesAttribute"; diff --git a/src/AwsLambda.Host.SourceGenerators/MapHandlerIncrementalGenerator.cs b/src/MinimalLambda.SourceGenerators/MapHandlerIncrementalGenerator.cs similarity index 97% rename from src/AwsLambda.Host.SourceGenerators/MapHandlerIncrementalGenerator.cs rename to src/MinimalLambda.SourceGenerators/MapHandlerIncrementalGenerator.cs index e94020cb..7484b1c1 100644 --- a/src/AwsLambda.Host.SourceGenerators/MapHandlerIncrementalGenerator.cs +++ b/src/MinimalLambda.SourceGenerators/MapHandlerIncrementalGenerator.cs @@ -1,10 +1,10 @@ using System.Reflection; -using AwsLambda.Host.SourceGenerators.Models; -using AwsLambda.Host.SourceGenerators.Types; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; +using MinimalLambda.SourceGenerators.Models; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; [Generator] public class MapHandlerIncrementalGenerator : IIncrementalGenerator diff --git a/src/AwsLambda.Host.SourceGenerators/AwsLambda.Host.SourceGenerators.csproj b/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj similarity index 100% rename from src/AwsLambda.Host.SourceGenerators/AwsLambda.Host.SourceGenerators.csproj rename to src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj diff --git a/src/AwsLambda.Host.SourceGenerators/Models/ArgumentInfo.cs b/src/MinimalLambda.SourceGenerators/Models/ArgumentInfo.cs similarity index 60% rename from src/AwsLambda.Host.SourceGenerators/Models/ArgumentInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/ArgumentInfo.cs index b824c1d9..3b1c1f17 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/ArgumentInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/ArgumentInfo.cs @@ -1,3 +1,3 @@ -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct ArgumentInfo(string? Type, string? Name); diff --git a/src/AwsLambda.Host.SourceGenerators/Models/CompilationInfo.cs b/src/MinimalLambda.SourceGenerators/Models/CompilationInfo.cs similarity index 80% rename from src/AwsLambda.Host.SourceGenerators/Models/CompilationInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/CompilationInfo.cs index 3964f44d..871699c8 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/CompilationInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/CompilationInfo.cs @@ -1,6 +1,6 @@ -using AwsLambda.Host.SourceGenerators.Types; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct CompilationInfo( EquatableArray MapHandlerInvocationInfos, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/DelegateInfo.cs b/src/MinimalLambda.SourceGenerators/Models/DelegateInfo.cs similarity index 91% rename from src/AwsLambda.Host.SourceGenerators/Models/DelegateInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/DelegateInfo.cs index 3127865e..55c0a5ac 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/DelegateInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/DelegateInfo.cs @@ -1,7 +1,7 @@ using System.Linq; -using AwsLambda.Host.SourceGenerators.Types; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct DelegateInfo( EquatableArray Parameters, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/HigherOrderMethodInfo.cs b/src/MinimalLambda.SourceGenerators/Models/HigherOrderMethodInfo.cs similarity index 84% rename from src/AwsLambda.Host.SourceGenerators/Models/HigherOrderMethodInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/HigherOrderMethodInfo.cs index 0e58a401..5a34ffa9 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/HigherOrderMethodInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/HigherOrderMethodInfo.cs @@ -1,6 +1,6 @@ using System.Collections.Immutable; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct HigherOrderMethodInfo( string Name, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/InterceptableLocationInfo.cs b/src/MinimalLambda.SourceGenerators/Models/InterceptableLocationInfo.cs similarity index 89% rename from src/AwsLambda.Host.SourceGenerators/Models/InterceptableLocationInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/InterceptableLocationInfo.cs index 9cd0365f..0ecd39eb 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/InterceptableLocationInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/InterceptableLocationInfo.cs @@ -1,6 +1,6 @@ using Microsoft.CodeAnalysis.CSharp; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct InterceptableLocationInfo( int Version, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/KeyedServiceKeyInfo.cs b/src/MinimalLambda.SourceGenerators/Models/KeyedServiceKeyInfo.cs similarity index 96% rename from src/AwsLambda.Host.SourceGenerators/Models/KeyedServiceKeyInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/KeyedServiceKeyInfo.cs index d4eeb9d7..5a0bde68 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/KeyedServiceKeyInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/KeyedServiceKeyInfo.cs @@ -1,9 +1,9 @@ -using AwsLambda.Host.SourceGenerators.Extensions; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using MinimalLambda.SourceGenerators.Extensions; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct KeyedServiceKeyInfo( string? DisplayValue, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/LocationInfo.cs b/src/MinimalLambda.SourceGenerators/Models/LocationInfo.cs similarity index 94% rename from src/AwsLambda.Host.SourceGenerators/Models/LocationInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/LocationInfo.cs index e1e3019b..3365f656 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/LocationInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/LocationInfo.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Text; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct LocationInfo( string FilePath, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/ParameterInfo.cs b/src/MinimalLambda.SourceGenerators/Models/ParameterInfo.cs similarity index 98% rename from src/AwsLambda.Host.SourceGenerators/Models/ParameterInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/ParameterInfo.cs index 1666b11d..c2f82cb9 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/ParameterInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/ParameterInfo.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Microsoft.CodeAnalysis; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct ParameterInfo( string Name, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/ParameterSource.cs b/src/MinimalLambda.SourceGenerators/Models/ParameterSource.cs similarity index 69% rename from src/AwsLambda.Host.SourceGenerators/Models/ParameterSource.cs rename to src/MinimalLambda.SourceGenerators/Models/ParameterSource.cs index a885f2fc..1aad9519 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/ParameterSource.cs +++ b/src/MinimalLambda.SourceGenerators/Models/ParameterSource.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal enum ParameterSource { diff --git a/src/AwsLambda.Host.SourceGenerators/Models/SimpleMethodInfo.cs b/src/MinimalLambda.SourceGenerators/Models/SimpleMethodInfo.cs similarity index 76% rename from src/AwsLambda.Host.SourceGenerators/Models/SimpleMethodInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/SimpleMethodInfo.cs index b0650230..082379fc 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/SimpleMethodInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/SimpleMethodInfo.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; internal readonly record struct SimpleMethodInfo( string Name, diff --git a/src/AwsLambda.Host.SourceGenerators/Models/TypeInfo.cs b/src/MinimalLambda.SourceGenerators/Models/TypeInfo.cs similarity index 95% rename from src/AwsLambda.Host.SourceGenerators/Models/TypeInfo.cs rename to src/MinimalLambda.SourceGenerators/Models/TypeInfo.cs index efe1b538..59d43528 100644 --- a/src/AwsLambda.Host.SourceGenerators/Models/TypeInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Models/TypeInfo.cs @@ -1,10 +1,10 @@ using System.Collections.Immutable; using System.Linq; -using AwsLambda.Host.SourceGenerators.Extensions; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using MinimalLambda.SourceGenerators.Extensions; -namespace AwsLambda.Host.SourceGenerators.Models; +namespace MinimalLambda.SourceGenerators.Models; /// Represents the information associated with a named type in C# source code. internal readonly record struct TypeInfo( diff --git a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/CommonSources.cs b/src/MinimalLambda.SourceGenerators/OutputGenerators/CommonSources.cs similarity index 89% rename from src/AwsLambda.Host.SourceGenerators/OutputGenerators/CommonSources.cs rename to src/MinimalLambda.SourceGenerators/OutputGenerators/CommonSources.cs index 3c177bb2..45d3c845 100644 --- a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/CommonSources.cs +++ b/src/MinimalLambda.SourceGenerators/OutputGenerators/CommonSources.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class CommonSources { diff --git a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/GenericHandlerSources.cs b/src/MinimalLambda.SourceGenerators/OutputGenerators/GenericHandlerSources.cs similarity index 97% rename from src/AwsLambda.Host.SourceGenerators/OutputGenerators/GenericHandlerSources.cs rename to src/MinimalLambda.SourceGenerators/OutputGenerators/GenericHandlerSources.cs index 533b2c8e..cb78475f 100644 --- a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/GenericHandlerSources.cs +++ b/src/MinimalLambda.SourceGenerators/OutputGenerators/GenericHandlerSources.cs @@ -1,9 +1,9 @@ using System.Linq; -using AwsLambda.Host.SourceGenerators.Extensions; -using AwsLambda.Host.SourceGenerators.Models; -using AwsLambda.Host.SourceGenerators.Types; +using MinimalLambda.SourceGenerators.Extensions; +using MinimalLambda.SourceGenerators.Models; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class GenericHandlerSources { diff --git a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/LambdaHostOutputGenerator.cs b/src/MinimalLambda.SourceGenerators/OutputGenerators/LambdaHostOutputGenerator.cs similarity index 96% rename from src/AwsLambda.Host.SourceGenerators/OutputGenerators/LambdaHostOutputGenerator.cs rename to src/MinimalLambda.SourceGenerators/OutputGenerators/LambdaHostOutputGenerator.cs index 94befc1c..b0578109 100644 --- a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/LambdaHostOutputGenerator.cs +++ b/src/MinimalLambda.SourceGenerators/OutputGenerators/LambdaHostOutputGenerator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; -using AwsLambda.Host.SourceGenerators.Models; using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class LambdaHostOutputGenerator { diff --git a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/MapHandlerSources.cs b/src/MinimalLambda.SourceGenerators/OutputGenerators/MapHandlerSources.cs similarity index 96% rename from src/AwsLambda.Host.SourceGenerators/OutputGenerators/MapHandlerSources.cs rename to src/MinimalLambda.SourceGenerators/OutputGenerators/MapHandlerSources.cs index 472795b4..323461f3 100644 --- a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/MapHandlerSources.cs +++ b/src/MinimalLambda.SourceGenerators/OutputGenerators/MapHandlerSources.cs @@ -1,9 +1,9 @@ using System.Linq; -using AwsLambda.Host.SourceGenerators.Extensions; -using AwsLambda.Host.SourceGenerators.Models; -using AwsLambda.Host.SourceGenerators.Types; +using MinimalLambda.SourceGenerators.Extensions; +using MinimalLambda.SourceGenerators.Models; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class MapHandlerSources { diff --git a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/OpenTelemetrySources.cs b/src/MinimalLambda.SourceGenerators/OutputGenerators/OpenTelemetrySources.cs similarity index 89% rename from src/AwsLambda.Host.SourceGenerators/OutputGenerators/OpenTelemetrySources.cs rename to src/MinimalLambda.SourceGenerators/OutputGenerators/OpenTelemetrySources.cs index c1ce57c7..7061f00b 100644 --- a/src/AwsLambda.Host.SourceGenerators/OutputGenerators/OpenTelemetrySources.cs +++ b/src/MinimalLambda.SourceGenerators/OutputGenerators/OpenTelemetrySources.cs @@ -1,8 +1,8 @@ using System.Linq; -using AwsLambda.Host.SourceGenerators.Models; -using AwsLambda.Host.SourceGenerators.Types; +using MinimalLambda.SourceGenerators.Models; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class OpenTelemetrySources { diff --git a/src/AwsLambda.Host.SourceGenerators/Properties/AssemblyInfo.cs b/src/MinimalLambda.SourceGenerators/Properties/AssemblyInfo.cs similarity index 56% rename from src/AwsLambda.Host.SourceGenerators/Properties/AssemblyInfo.cs rename to src/MinimalLambda.SourceGenerators/Properties/AssemblyInfo.cs index 20b7ecfa..e6be45eb 100644 --- a/src/AwsLambda.Host.SourceGenerators/Properties/AssemblyInfo.cs +++ b/src/MinimalLambda.SourceGenerators/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("AwsLambda.Host.SourceGenerators.UnitTests")] +[assembly: InternalsVisibleTo("MinimalLambda.SourceGenerators.UnitTests")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] diff --git a/src/MinimalLambda.SourceGenerators/Properties/launchSettings.json b/src/MinimalLambda.SourceGenerators/Properties/launchSettings.json new file mode 100644 index 00000000..dafb0ebf --- /dev/null +++ b/src/MinimalLambda.SourceGenerators/Properties/launchSettings.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "profiles": { + "MinimalLambda.SourceGenerators": { + "commandName": "DebugRoslynComponent", + "targetProject": "../../examples/MinimalLambda.Example.HelloWorld/MinimalLambda.Example.HelloWorld.csproj" + } + } +} diff --git a/src/AwsLambda.Host.SourceGenerators/README.md b/src/MinimalLambda.SourceGenerators/README.md similarity index 85% rename from src/AwsLambda.Host.SourceGenerators/README.md rename to src/MinimalLambda.SourceGenerators/README.md index 94287259..369af700 100644 --- a/src/AwsLambda.Host.SourceGenerators/README.md +++ b/src/MinimalLambda.SourceGenerators/README.md @@ -1,4 +1,4 @@ -# AwsLambda.Host.SourceGenerators +# MinimalLambda.SourceGenerators ## Notes diff --git a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/Extractors/HandlerInfoExtractor.cs b/src/MinimalLambda.SourceGenerators/SyntaxProviders/Extractors/HandlerInfoExtractor.cs similarity index 96% rename from src/AwsLambda.Host.SourceGenerators/SyntaxProviders/Extractors/HandlerInfoExtractor.cs rename to src/MinimalLambda.SourceGenerators/SyntaxProviders/Extractors/HandlerInfoExtractor.cs index 077852a3..41306e4a 100644 --- a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/Extractors/HandlerInfoExtractor.cs +++ b/src/MinimalLambda.SourceGenerators/SyntaxProviders/Extractors/HandlerInfoExtractor.cs @@ -3,16 +3,18 @@ using System.Collections.Immutable; using System.Linq; using System.Threading; -using AwsLambda.Host.SourceGenerators.Extensions; -using AwsLambda.Host.SourceGenerators.Models; -using AwsLambda.Host.SourceGenerators.Types; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Operations; -using TypeInfo = AwsLambda.Host.SourceGenerators.Models.TypeInfo; +using MinimalLambda.SourceGenerators.Extensions; +using MinimalLambda.SourceGenerators.Models; +using MinimalLambda.SourceGenerators.Types; +using TypeInfo = MinimalLambda.SourceGenerators.Models.TypeInfo; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; + +using TypeInfo = TypeInfo; internal static class HandlerInfoExtractor { @@ -37,14 +39,10 @@ is not IInvocationOperation { Name: "Builder", ContainingNamespace: - { - Name: "Host", - ContainingNamespace: - { Name: "AwsLambda", ContainingNamespace.IsGlobalNamespace: true }, - }, + { Name: "MinimalLambda", ContainingNamespace.IsGlobalNamespace: true }, }, } targetOperation - || targetOperation.TargetMethod.ContainingAssembly.Name != "AwsLambda.Host" + || targetOperation.TargetMethod.ContainingAssembly.Name != "MinimalLambda" ) return null; diff --git a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/LambdaApplicationBuilderBuildSyntaxProvider.cs b/src/MinimalLambda.SourceGenerators/SyntaxProviders/LambdaApplicationBuilderBuildSyntaxProvider.cs similarity index 94% rename from src/AwsLambda.Host.SourceGenerators/SyntaxProviders/LambdaApplicationBuilderBuildSyntaxProvider.cs rename to src/MinimalLambda.SourceGenerators/SyntaxProviders/LambdaApplicationBuilderBuildSyntaxProvider.cs index 8cc95951..ae329bd4 100644 --- a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/LambdaApplicationBuilderBuildSyntaxProvider.cs +++ b/src/MinimalLambda.SourceGenerators/SyntaxProviders/LambdaApplicationBuilderBuildSyntaxProvider.cs @@ -1,11 +1,11 @@ using System.Threading; -using AwsLambda.Host.SourceGenerators.Models; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Operations; +using MinimalLambda.SourceGenerators.Models; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class LambdaApplicationBuilderBuildSyntaxProvider { @@ -38,7 +38,7 @@ is IInvocationOperation }, }, } targetOperation - && targetOperation.TargetMethod.ContainingAssembly.Name == "AwsLambda.Host" + && targetOperation.TargetMethod.ContainingAssembly.Name == "MinimalLambda" ) { var interceptableLocation = context.SemanticModel.GetInterceptableLocation( diff --git a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/MapHandlerSyntaxProvider.cs b/src/MinimalLambda.SourceGenerators/SyntaxProviders/MapHandlerSyntaxProvider.cs similarity index 85% rename from src/AwsLambda.Host.SourceGenerators/SyntaxProviders/MapHandlerSyntaxProvider.cs rename to src/MinimalLambda.SourceGenerators/SyntaxProviders/MapHandlerSyntaxProvider.cs index c280754c..152fbf81 100644 --- a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/MapHandlerSyntaxProvider.cs +++ b/src/MinimalLambda.SourceGenerators/SyntaxProviders/MapHandlerSyntaxProvider.cs @@ -1,8 +1,8 @@ using System.Threading; -using AwsLambda.Host.SourceGenerators.Models; using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class MapHandlerSyntaxProvider { diff --git a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/OnInitSyntaxProvider.cs b/src/MinimalLambda.SourceGenerators/SyntaxProviders/OnInitSyntaxProvider.cs similarity index 92% rename from src/AwsLambda.Host.SourceGenerators/SyntaxProviders/OnInitSyntaxProvider.cs rename to src/MinimalLambda.SourceGenerators/SyntaxProviders/OnInitSyntaxProvider.cs index cf8044c9..c15e97ad 100644 --- a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/OnInitSyntaxProvider.cs +++ b/src/MinimalLambda.SourceGenerators/SyntaxProviders/OnInitSyntaxProvider.cs @@ -1,8 +1,8 @@ using System.Threading; -using AwsLambda.Host.SourceGenerators.Models; using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class OnInitSyntaxProvider { diff --git a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/OnShutdownSyntaxProvider.cs b/src/MinimalLambda.SourceGenerators/SyntaxProviders/OnShutdownSyntaxProvider.cs similarity index 92% rename from src/AwsLambda.Host.SourceGenerators/SyntaxProviders/OnShutdownSyntaxProvider.cs rename to src/MinimalLambda.SourceGenerators/SyntaxProviders/OnShutdownSyntaxProvider.cs index 556aed19..b96bf94b 100644 --- a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/OnShutdownSyntaxProvider.cs +++ b/src/MinimalLambda.SourceGenerators/SyntaxProviders/OnShutdownSyntaxProvider.cs @@ -1,8 +1,8 @@ using System.Threading; -using AwsLambda.Host.SourceGenerators.Models; using Microsoft.CodeAnalysis; +using MinimalLambda.SourceGenerators.Models; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class OnShutdownSyntaxProvider { diff --git a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/UseOpenTelemetryTracingSyntaxProvider.cs b/src/MinimalLambda.SourceGenerators/SyntaxProviders/UseOpenTelemetryTracingSyntaxProvider.cs similarity index 92% rename from src/AwsLambda.Host.SourceGenerators/SyntaxProviders/UseOpenTelemetryTracingSyntaxProvider.cs rename to src/MinimalLambda.SourceGenerators/SyntaxProviders/UseOpenTelemetryTracingSyntaxProvider.cs index 5d77e4bd..1ab88a45 100644 --- a/src/AwsLambda.Host.SourceGenerators/SyntaxProviders/UseOpenTelemetryTracingSyntaxProvider.cs +++ b/src/MinimalLambda.SourceGenerators/SyntaxProviders/UseOpenTelemetryTracingSyntaxProvider.cs @@ -1,11 +1,11 @@ using System.Threading; -using AwsLambda.Host.SourceGenerators.Models; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Operations; +using MinimalLambda.SourceGenerators.Models; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class UseOpenTelemetryTracingSyntaxProvider { @@ -35,8 +35,7 @@ is IInvocationOperation }, }, } targetOperation - && targetOperation.TargetMethod.ContainingAssembly.Name - == "AwsLambda.Host.OpenTelemetry" + && targetOperation.TargetMethod.ContainingAssembly.Name == "MinimalLambda.OpenTelemetry" ) { var interceptableLocation = context.SemanticModel.GetInterceptableLocation( diff --git a/src/AwsLambda.Host.SourceGenerators/TemplateHelper.cs b/src/MinimalLambda.SourceGenerators/TemplateHelper.cs similarity index 70% rename from src/AwsLambda.Host.SourceGenerators/TemplateHelper.cs rename to src/MinimalLambda.SourceGenerators/TemplateHelper.cs index 1b06fba1..0cb4a1a7 100644 --- a/src/AwsLambda.Host.SourceGenerators/TemplateHelper.cs +++ b/src/MinimalLambda.SourceGenerators/TemplateHelper.cs @@ -4,7 +4,7 @@ using System.Reflection; using Scriban; -namespace AwsLambda.Host.SourceGenerators; +namespace MinimalLambda.SourceGenerators; internal static class TemplateHelper { @@ -14,23 +14,24 @@ internal static class TemplateHelper internal static Template LoadTemplate(string relativePath) { var baseName = Assembly.GetExecutingAssembly().GetName().Name; - var templateName = - relativePath.TrimStart('.') - .Replace(Path.DirectorySeparatorChar, '.') - .Replace(Path.AltDirectorySeparatorChar, '.'); + var templateName = relativePath + .TrimStart('.') + .Replace(Path.DirectorySeparatorChar, '.') + .Replace(Path.AltDirectorySeparatorChar, '.'); - var manifestTemplateName = - Assembly.GetExecutingAssembly() - .GetManifestResourceNames() - .FirstOrDefault(x => x!.EndsWith(templateName, StringComparison.InvariantCulture)); + var manifestTemplateName = Assembly + .GetExecutingAssembly() + .GetManifestResourceNames() + .FirstOrDefault(x => x!.EndsWith(templateName, StringComparison.InvariantCulture)); if (string.IsNullOrEmpty(manifestTemplateName)) throw new InvalidOperationException( $"Did not find required resource ending in '{templateName}' in assembly '{baseName}'." ); - using var stream = - Assembly.GetExecutingAssembly().GetManifestResourceStream(manifestTemplateName); + using var stream = Assembly + .GetExecutingAssembly() + .GetManifestResourceStream(manifestTemplateName); if (stream == null) throw new FileNotFoundException( $"Template '{relativePath}' not found in embedded resources." diff --git a/src/AwsLambda.Host.SourceGenerators/Templates/GenericHandler.scriban b/src/MinimalLambda.SourceGenerators/Templates/GenericHandler.scriban similarity index 95% rename from src/AwsLambda.Host.SourceGenerators/Templates/GenericHandler.scriban rename to src/MinimalLambda.SourceGenerators/Templates/GenericHandler.scriban index 949c29dc..acfbb6f0 100644 --- a/src/AwsLambda.Host.SourceGenerators/Templates/GenericHandler.scriban +++ b/src/MinimalLambda.SourceGenerators/Templates/GenericHandler.scriban @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -6,8 +6,8 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - + using MinimalLambda.Builder; + {{ generated_code_attribute }} file static class GeneratedLambda{{ name }}BuilderExtensions { @@ -20,9 +20,9 @@ namespace AwsLambda.Host.Core.Generated ) { var castHandler = ({{ call.handler_signature }})handler; - + return application.{{ name }}({{ name }}); - + {{ if call.should_await ~}} async {{ end ~}}{{ call.wrapper_return_type }} {{ name }}(IServiceProvider serviceProvider, CancellationToken cancellationToken) { {{~ if call.has_any_keyed_service_parameter ~}} diff --git a/src/AwsLambda.Host.SourceGenerators/Templates/InterceptsLocationAttribute.scriban b/src/MinimalLambda.SourceGenerators/Templates/InterceptsLocationAttribute.scriban similarity index 95% rename from src/AwsLambda.Host.SourceGenerators/Templates/InterceptsLocationAttribute.scriban rename to src/MinimalLambda.SourceGenerators/Templates/InterceptsLocationAttribute.scriban index 3802eca8..37a13190 100644 --- a/src/AwsLambda.Host.SourceGenerators/Templates/InterceptsLocationAttribute.scriban +++ b/src/MinimalLambda.SourceGenerators/Templates/InterceptsLocationAttribute.scriban @@ -14,8 +14,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - {{ generated_code_attribute }} + + {{ generated_code_attribute }} [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { diff --git a/src/AwsLambda.Host.SourceGenerators/Templates/MapHandler.scriban b/src/MinimalLambda.SourceGenerators/Templates/MapHandler.scriban similarity index 94% rename from src/AwsLambda.Host.SourceGenerators/Templates/MapHandler.scriban rename to src/MinimalLambda.SourceGenerators/Templates/MapHandler.scriban index d60d1c94..4d829209 100644 --- a/src/AwsLambda.Host.SourceGenerators/Templates/MapHandler.scriban +++ b/src/MinimalLambda.SourceGenerators/Templates/MapHandler.scriban @@ -1,19 +1,19 @@ -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - + {{ generated_code_attribute }} file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + {{~ for call in map_handler_calls ~}} // Location: {{ call.location.display_location }} [InterceptsLocation({{ call.location.version }}, "{{ call.location.data }}")] @@ -23,23 +23,23 @@ namespace AwsLambda.Host.Core.Generated ) { var castHandler = ({{ call.handler_signature }})handler; - + application.Handle(InvocationDelegate); {{~ if call.is_event_feature_required ~}} - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create<{{ call.input_event.type }}>(); {{~ end ~}} {{~ if call.is_response_feature_required ~}} - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create<{{ call.output_response.response_type }}>(); {{~ end ~}} - + return application; {{ if call.should_await ~}} async {{ end ~}}Task InvocationDelegate(ILambdaHostContext context) @@ -67,7 +67,7 @@ namespace AwsLambda.Host.Core.Generated {{~ end ~}} {{~ end ~}} {{~ if !call.should_await ~}} - return Task.CompletedTask; + return Task.CompletedTask; {{~ end ~}} } } diff --git a/src/AwsLambda.Host.SourceGenerators/Types/EquatableArray.cs b/src/MinimalLambda.SourceGenerators/Types/EquatableArray.cs similarity index 98% rename from src/AwsLambda.Host.SourceGenerators/Types/EquatableArray.cs rename to src/MinimalLambda.SourceGenerators/Types/EquatableArray.cs index 28afe924..07e75081 100644 --- a/src/AwsLambda.Host.SourceGenerators/Types/EquatableArray.cs +++ b/src/MinimalLambda.SourceGenerators/Types/EquatableArray.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Collections.Immutable; -namespace AwsLambda.Host.SourceGenerators.Types; +namespace MinimalLambda.SourceGenerators.Types; /// /// An immutable, equatable array. This is equivalent to but with diff --git a/src/AwsLambda.Host.SourceGenerators/Types/EquatableArrayExtensions.cs b/src/MinimalLambda.SourceGenerators/Types/EquatableArrayExtensions.cs similarity index 84% rename from src/AwsLambda.Host.SourceGenerators/Types/EquatableArrayExtensions.cs rename to src/MinimalLambda.SourceGenerators/Types/EquatableArrayExtensions.cs index 1b964f37..6872bbdc 100644 --- a/src/AwsLambda.Host.SourceGenerators/Types/EquatableArrayExtensions.cs +++ b/src/MinimalLambda.SourceGenerators/Types/EquatableArrayExtensions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace AwsLambda.Host.SourceGenerators.Types; +namespace MinimalLambda.SourceGenerators.Types; internal static class EquatableArrayExtensions { diff --git a/src/AwsLambda.Host.SourceGenerators/Types/HashCode.cs b/src/MinimalLambda.SourceGenerators/Types/HashCode.cs similarity index 99% rename from src/AwsLambda.Host.SourceGenerators/Types/HashCode.cs rename to src/MinimalLambda.SourceGenerators/Types/HashCode.cs index 7d620f4e..94be6873 100644 --- a/src/AwsLambda.Host.SourceGenerators/Types/HashCode.cs +++ b/src/MinimalLambda.SourceGenerators/Types/HashCode.cs @@ -3,7 +3,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; -namespace AwsLambda.Host.SourceGenerators.Types; +namespace MinimalLambda.SourceGenerators.Types; /// Polyfill for .NET 6 HashCode internal struct HashCode diff --git a/src/AwsLambda.Host/Builder/DefaultLambdaInvocationBuilderFactory.cs b/src/MinimalLambda/Builder/DefaultLambdaInvocationBuilderFactory.cs similarity index 87% rename from src/AwsLambda.Host/Builder/DefaultLambdaInvocationBuilderFactory.cs rename to src/MinimalLambda/Builder/DefaultLambdaInvocationBuilderFactory.cs index 39298725..5eb974c1 100644 --- a/src/AwsLambda.Host/Builder/DefaultLambdaInvocationBuilderFactory.cs +++ b/src/MinimalLambda/Builder/DefaultLambdaInvocationBuilderFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal class DefaultLambdaInvocationBuilderFactory(IServiceProvider serviceProvider) : ILambdaInvocationBuilderFactory diff --git a/src/AwsLambda.Host/Builder/DefaultLambdaOnInitBuilderFactory.cs b/src/MinimalLambda/Builder/DefaultLambdaOnInitBuilderFactory.cs similarity index 92% rename from src/AwsLambda.Host/Builder/DefaultLambdaOnInitBuilderFactory.cs rename to src/MinimalLambda/Builder/DefaultLambdaOnInitBuilderFactory.cs index dfc0b70d..bde176c7 100644 --- a/src/AwsLambda.Host/Builder/DefaultLambdaOnInitBuilderFactory.cs +++ b/src/MinimalLambda/Builder/DefaultLambdaOnInitBuilderFactory.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal class DefaultLambdaOnInitBuilderFactory( IServiceProvider serviceProvider, diff --git a/src/AwsLambda.Host/Builder/DefaultLambdaOnShutdownBuilderFactory.cs b/src/MinimalLambda/Builder/DefaultLambdaOnShutdownBuilderFactory.cs similarity index 90% rename from src/AwsLambda.Host/Builder/DefaultLambdaOnShutdownBuilderFactory.cs rename to src/MinimalLambda/Builder/DefaultLambdaOnShutdownBuilderFactory.cs index 1c976aa9..a9038709 100644 --- a/src/AwsLambda.Host/Builder/DefaultLambdaOnShutdownBuilderFactory.cs +++ b/src/MinimalLambda/Builder/DefaultLambdaOnShutdownBuilderFactory.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal class DefaultLambdaOnShutdownBuilderFactory( IServiceProvider serviceProvider, diff --git a/src/AwsLambda.Host/Builder/EventAttribute.cs b/src/MinimalLambda/Builder/EventAttribute.cs similarity index 97% rename from src/AwsLambda.Host/Builder/EventAttribute.cs rename to src/MinimalLambda/Builder/EventAttribute.cs index 61fcb664..842681d3 100644 --- a/src/AwsLambda.Host/Builder/EventAttribute.cs +++ b/src/MinimalLambda/Builder/EventAttribute.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Marks a parameter to receive the deserialized Lambda event object. /// diff --git a/src/AwsLambda.Host/Builder/Extensions/BuilderLambdaApplicationExtensions.cs b/src/MinimalLambda/Builder/Extensions/BuilderLambdaApplicationExtensions.cs similarity index 99% rename from src/AwsLambda.Host/Builder/Extensions/BuilderLambdaApplicationExtensions.cs rename to src/MinimalLambda/Builder/Extensions/BuilderLambdaApplicationExtensions.cs index 3202119b..7182a4ed 100644 --- a/src/AwsLambda.Host/Builder/Extensions/BuilderLambdaApplicationExtensions.cs +++ b/src/MinimalLambda/Builder/Extensions/BuilderLambdaApplicationExtensions.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// /// Provides extension methods on for creating and diff --git a/src/AwsLambda.Host/Builder/Extensions/ConfigurationServiceCollectionExtensions.cs b/src/MinimalLambda/Builder/Extensions/ConfigurationServiceCollectionExtensions.cs similarity index 100% rename from src/AwsLambda.Host/Builder/Extensions/ConfigurationServiceCollectionExtensions.cs rename to src/MinimalLambda/Builder/Extensions/ConfigurationServiceCollectionExtensions.cs diff --git a/src/AwsLambda.Host/Builder/Extensions/LambdaHttpClientServiceCollectionExtensions.cs b/src/MinimalLambda/Builder/Extensions/LambdaHttpClientServiceCollectionExtensions.cs similarity index 99% rename from src/AwsLambda.Host/Builder/Extensions/LambdaHttpClientServiceCollectionExtensions.cs rename to src/MinimalLambda/Builder/Extensions/LambdaHttpClientServiceCollectionExtensions.cs index 20c65192..3c46b6aa 100644 --- a/src/AwsLambda.Host/Builder/Extensions/LambdaHttpClientServiceCollectionExtensions.cs +++ b/src/MinimalLambda/Builder/Extensions/LambdaHttpClientServiceCollectionExtensions.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -namespace AwsLambda.Host.Builder.Extensions; +namespace MinimalLambda.Builder.Extensions; /// /// Extension methods for configuring the Lambda bootstrap HTTP client in an diff --git a/src/AwsLambda.Host/Builder/Extensions/MiddlewareLambdaApplicationExtensions.cs b/src/MinimalLambda/Builder/Extensions/MiddlewareLambdaApplicationExtensions.cs similarity index 98% rename from src/AwsLambda.Host/Builder/Extensions/MiddlewareLambdaApplicationExtensions.cs rename to src/MinimalLambda/Builder/Extensions/MiddlewareLambdaApplicationExtensions.cs index 86e0dffd..c9a35cd2 100644 --- a/src/AwsLambda.Host/Builder/Extensions/MiddlewareLambdaApplicationExtensions.cs +++ b/src/MinimalLambda/Builder/Extensions/MiddlewareLambdaApplicationExtensions.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Provides extension methods for adding middleware to the Lambda invocation pipeline. public static class MiddlewareLambdaApplicationExtensions diff --git a/src/AwsLambda.Host/Builder/Extensions/SerializerServiceCollectionExtensions.cs b/src/MinimalLambda/Builder/Extensions/SerializerServiceCollectionExtensions.cs similarity index 100% rename from src/AwsLambda.Host/Builder/Extensions/SerializerServiceCollectionExtensions.cs rename to src/MinimalLambda/Builder/Extensions/SerializerServiceCollectionExtensions.cs diff --git a/src/AwsLambda.Host/Builder/Extensions/ServiceCollectionExtensions.cs b/src/MinimalLambda/Builder/Extensions/ServiceCollectionExtensions.cs similarity index 100% rename from src/AwsLambda.Host/Builder/Extensions/ServiceCollectionExtensions.cs rename to src/MinimalLambda/Builder/Extensions/ServiceCollectionExtensions.cs diff --git a/src/AwsLambda.Host/Builder/ILambdaInvocationBuilderFactory.cs b/src/MinimalLambda/Builder/ILambdaInvocationBuilderFactory.cs similarity index 75% rename from src/AwsLambda.Host/Builder/ILambdaInvocationBuilderFactory.cs rename to src/MinimalLambda/Builder/ILambdaInvocationBuilderFactory.cs index a44827e4..ca6297c4 100644 --- a/src/AwsLambda.Host/Builder/ILambdaInvocationBuilderFactory.cs +++ b/src/MinimalLambda/Builder/ILambdaInvocationBuilderFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal interface ILambdaInvocationBuilderFactory { diff --git a/src/AwsLambda.Host/Builder/ILambdaOnInitBuilderFactory.cs b/src/MinimalLambda/Builder/ILambdaOnInitBuilderFactory.cs similarity index 73% rename from src/AwsLambda.Host/Builder/ILambdaOnInitBuilderFactory.cs rename to src/MinimalLambda/Builder/ILambdaOnInitBuilderFactory.cs index 12948eab..6288c67a 100644 --- a/src/AwsLambda.Host/Builder/ILambdaOnInitBuilderFactory.cs +++ b/src/MinimalLambda/Builder/ILambdaOnInitBuilderFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal interface ILambdaOnInitBuilderFactory { diff --git a/src/AwsLambda.Host/Builder/ILambdaOnShutdownBuilderFactory.cs b/src/MinimalLambda/Builder/ILambdaOnShutdownBuilderFactory.cs similarity index 75% rename from src/AwsLambda.Host/Builder/ILambdaOnShutdownBuilderFactory.cs rename to src/MinimalLambda/Builder/ILambdaOnShutdownBuilderFactory.cs index 66b7ec77..167058c5 100644 --- a/src/AwsLambda.Host/Builder/ILambdaOnShutdownBuilderFactory.cs +++ b/src/MinimalLambda/Builder/ILambdaOnShutdownBuilderFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal interface ILambdaOnShutdownBuilderFactory { diff --git a/src/AwsLambda.Host/Builder/InterceptionTargets/MapHandlerLambdaApplicationExtensions.cs b/src/MinimalLambda/Builder/InterceptionTargets/MapHandlerLambdaApplicationExtensions.cs similarity index 98% rename from src/AwsLambda.Host/Builder/InterceptionTargets/MapHandlerLambdaApplicationExtensions.cs rename to src/MinimalLambda/Builder/InterceptionTargets/MapHandlerLambdaApplicationExtensions.cs index 4d874b35..ba2d17c3 100644 --- a/src/AwsLambda.Host/Builder/InterceptionTargets/MapHandlerLambdaApplicationExtensions.cs +++ b/src/MinimalLambda/Builder/InterceptionTargets/MapHandlerLambdaApplicationExtensions.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// /// Overloads for diff --git a/src/AwsLambda.Host/Builder/InterceptionTargets/OnInitLambdaApplicationExtensions.cs b/src/MinimalLambda/Builder/InterceptionTargets/OnInitLambdaApplicationExtensions.cs similarity index 98% rename from src/AwsLambda.Host/Builder/InterceptionTargets/OnInitLambdaApplicationExtensions.cs rename to src/MinimalLambda/Builder/InterceptionTargets/OnInitLambdaApplicationExtensions.cs index 0c8ecb84..c2f8f029 100644 --- a/src/AwsLambda.Host/Builder/InterceptionTargets/OnInitLambdaApplicationExtensions.cs +++ b/src/MinimalLambda/Builder/InterceptionTargets/OnInitLambdaApplicationExtensions.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// /// Overloads for that support diff --git a/src/AwsLambda.Host/Builder/InterceptionTargets/OnShutdownLambdaApplicationExtensions.cs b/src/MinimalLambda/Builder/InterceptionTargets/OnShutdownLambdaApplicationExtensions.cs similarity index 98% rename from src/AwsLambda.Host/Builder/InterceptionTargets/OnShutdownLambdaApplicationExtensions.cs rename to src/MinimalLambda/Builder/InterceptionTargets/OnShutdownLambdaApplicationExtensions.cs index 717d2684..7ccaea58 100644 --- a/src/AwsLambda.Host/Builder/InterceptionTargets/OnShutdownLambdaApplicationExtensions.cs +++ b/src/MinimalLambda/Builder/InterceptionTargets/OnShutdownLambdaApplicationExtensions.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// /// Overloads for diff --git a/src/AwsLambda.Host/Builder/LambdaApplication.cs b/src/MinimalLambda/Builder/LambdaApplication.cs similarity index 99% rename from src/AwsLambda.Host/Builder/LambdaApplication.cs rename to src/MinimalLambda/Builder/LambdaApplication.cs index c1874d17..9f3f22e9 100644 --- a/src/AwsLambda.Host/Builder/LambdaApplication.cs +++ b/src/MinimalLambda/Builder/LambdaApplication.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// A Lambda application that provides host functionality for running AWS Lambda handlers. public sealed class LambdaApplication diff --git a/src/AwsLambda.Host/Builder/LambdaApplicationBuilder.cs b/src/MinimalLambda/Builder/LambdaApplicationBuilder.cs similarity index 97% rename from src/AwsLambda.Host/Builder/LambdaApplicationBuilder.cs rename to src/MinimalLambda/Builder/LambdaApplicationBuilder.cs index 46980047..f8405bfd 100644 --- a/src/AwsLambda.Host/Builder/LambdaApplicationBuilder.cs +++ b/src/MinimalLambda/Builder/LambdaApplicationBuilder.cs @@ -15,9 +15,9 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; -/// A builder for configuring and constructing an AWS Lambda Host application. +/// A builder for configuring and constructing a Lambda application. /// /// /// The is used to configure services, logging, @@ -38,7 +38,7 @@ namespace AwsLambda.Host.Builder; /// public sealed class LambdaApplicationBuilder : IHostApplicationBuilder { - private const string LambdaHostAppSettingsSectionName = "AwsLambdaHost"; + private const string LambdaHostAppSettingsSectionName = "LambdaHost"; private readonly HostApplicationBuilder _hostBuilder; private LambdaApplication? _builtApplication; @@ -59,7 +59,7 @@ internal LambdaApplicationBuilder(LambdaApplicationOptions? settings) ResolveContentRoot(settings); } - _hostBuilder = Microsoft.Extensions.Hosting.Host.CreateEmptyApplicationBuilder( + _hostBuilder = Host.CreateEmptyApplicationBuilder( new HostApplicationBuilderSettings { DisableDefaults = settings.DisableDefaults, diff --git a/src/AwsLambda.Host/Builder/LambdaInvocationBuilder.cs b/src/MinimalLambda/Builder/LambdaInvocationBuilder.cs similarity index 98% rename from src/AwsLambda.Host/Builder/LambdaInvocationBuilder.cs rename to src/MinimalLambda/Builder/LambdaInvocationBuilder.cs index a413c149..a9b0111f 100644 --- a/src/AwsLambda.Host/Builder/LambdaInvocationBuilder.cs +++ b/src/MinimalLambda/Builder/LambdaInvocationBuilder.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal class LambdaInvocationBuilder : ILambdaInvocationBuilder { diff --git a/src/AwsLambda.Host/Builder/LambdaOnInitBuilder.cs b/src/MinimalLambda/Builder/LambdaOnInitBuilder.cs similarity index 98% rename from src/AwsLambda.Host/Builder/LambdaOnInitBuilder.cs rename to src/MinimalLambda/Builder/LambdaOnInitBuilder.cs index 36505cfa..50a94ebd 100644 --- a/src/AwsLambda.Host/Builder/LambdaOnInitBuilder.cs +++ b/src/MinimalLambda/Builder/LambdaOnInitBuilder.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal class LambdaOnInitBuilder : ILambdaOnInitBuilder { diff --git a/src/AwsLambda.Host/Builder/LambdaOnShutdownBuilder.cs b/src/MinimalLambda/Builder/LambdaOnShutdownBuilder.cs similarity index 98% rename from src/AwsLambda.Host/Builder/LambdaOnShutdownBuilder.cs rename to src/MinimalLambda/Builder/LambdaOnShutdownBuilder.cs index a3f9deba..be9080f4 100644 --- a/src/AwsLambda.Host/Builder/LambdaOnShutdownBuilder.cs +++ b/src/MinimalLambda/Builder/LambdaOnShutdownBuilder.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; internal class LambdaOnShutdownBuilder : ILambdaOnShutdownBuilder { diff --git a/src/AwsLambda.Host/Builder/Middleware/ClearLambdaOutputFormattingMiddleware.cs b/src/MinimalLambda/Builder/Middleware/ClearLambdaOutputFormattingMiddleware.cs similarity index 98% rename from src/AwsLambda.Host/Builder/Middleware/ClearLambdaOutputFormattingMiddleware.cs rename to src/MinimalLambda/Builder/Middleware/ClearLambdaOutputFormattingMiddleware.cs index 25dfe8e1..6808ab63 100644 --- a/src/AwsLambda.Host/Builder/Middleware/ClearLambdaOutputFormattingMiddleware.cs +++ b/src/MinimalLambda/Builder/Middleware/ClearLambdaOutputFormattingMiddleware.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// /// Provides extension methods for clearing Lambda runtime output formatting in the middleware diff --git a/src/AwsLambda.Host/Builder/Middleware/RequestEnvelopeMiddleware.cs b/src/MinimalLambda/Builder/Middleware/RequestEnvelopeMiddleware.cs similarity index 97% rename from src/AwsLambda.Host/Builder/Middleware/RequestEnvelopeMiddleware.cs rename to src/MinimalLambda/Builder/Middleware/RequestEnvelopeMiddleware.cs index 515a16f6..78faf377 100644 --- a/src/AwsLambda.Host/Builder/Middleware/RequestEnvelopeMiddleware.cs +++ b/src/MinimalLambda/Builder/Middleware/RequestEnvelopeMiddleware.cs @@ -1,8 +1,8 @@ -using AwsLambda.Host.Envelopes; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; +using MinimalLambda.Envelopes; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Provides middleware for processing Lambda event and response envelopes. public static class RequestEnvelopeMiddleware diff --git a/src/AwsLambda.Host/Builder/OnInit/OutputFormattingLambdaApplicationExtensions.cs b/src/MinimalLambda/Builder/OnInit/OutputFormattingLambdaApplicationExtensions.cs similarity index 97% rename from src/AwsLambda.Host/Builder/OnInit/OutputFormattingLambdaApplicationExtensions.cs rename to src/MinimalLambda/Builder/OnInit/OutputFormattingLambdaApplicationExtensions.cs index 2e1c6571..5e6c6ad1 100644 --- a/src/AwsLambda.Host/Builder/OnInit/OutputFormattingLambdaApplicationExtensions.cs +++ b/src/MinimalLambda/Builder/OnInit/OutputFormattingLambdaApplicationExtensions.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Provides extension methods for managing Lambda runtime output formatting. public static class OutputFormattingLambdaApplicationExtensions diff --git a/src/AwsLambda.Host/Core/Cancellation/DefaultLambdaCancellationFactory.cs b/src/MinimalLambda/Core/Cancellation/DefaultLambdaCancellationFactory.cs similarity index 99% rename from src/AwsLambda.Host/Core/Cancellation/DefaultLambdaCancellationFactory.cs rename to src/MinimalLambda/Core/Cancellation/DefaultLambdaCancellationFactory.cs index 93f52541..abd9fc36 100644 --- a/src/AwsLambda.Host/Core/Cancellation/DefaultLambdaCancellationFactory.cs +++ b/src/MinimalLambda/Core/Cancellation/DefaultLambdaCancellationFactory.cs @@ -1,7 +1,7 @@ using Amazon.Lambda.Core; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides functionality to create a with respect to diff --git a/src/AwsLambda.Host/Core/Context/DefaultLambdaHostContext.cs b/src/MinimalLambda/Core/Context/DefaultLambdaHostContext.cs similarity index 99% rename from src/AwsLambda.Host/Core/Context/DefaultLambdaHostContext.cs rename to src/MinimalLambda/Core/Context/DefaultLambdaHostContext.cs index 4c07e181..df2ca1e4 100644 --- a/src/AwsLambda.Host/Core/Context/DefaultLambdaHostContext.cs +++ b/src/MinimalLambda/Core/Context/DefaultLambdaHostContext.cs @@ -1,7 +1,7 @@ using Amazon.Lambda.Core; using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal sealed class DefaultLambdaHostContext : ILambdaHostContext, IAsyncDisposable { diff --git a/src/AwsLambda.Host/Core/Context/ILambdaHostContextFactory.cs b/src/MinimalLambda/Core/Context/ILambdaHostContextFactory.cs similarity index 88% rename from src/AwsLambda.Host/Core/Context/ILambdaHostContextFactory.cs rename to src/MinimalLambda/Core/Context/ILambdaHostContextFactory.cs index a8fbe41c..69b39e03 100644 --- a/src/AwsLambda.Host/Core/Context/ILambdaHostContextFactory.cs +++ b/src/MinimalLambda/Core/Context/ILambdaHostContextFactory.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal interface ILambdaHostContextFactory { diff --git a/src/AwsLambda.Host/Core/Context/LambdaHostContextAccessor.cs b/src/MinimalLambda/Core/Context/LambdaHostContextAccessor.cs similarity index 96% rename from src/AwsLambda.Host/Core/Context/LambdaHostContextAccessor.cs rename to src/MinimalLambda/Core/Context/LambdaHostContextAccessor.cs index 63745206..70c5ef82 100644 --- a/src/AwsLambda.Host/Core/Context/LambdaHostContextAccessor.cs +++ b/src/MinimalLambda/Core/Context/LambdaHostContextAccessor.cs @@ -6,7 +6,7 @@ // See THIRD-PARTY-LICENSES.txt file in the project root or visit // https://github.com/dotnet/aspnetcore/blob/v10.0.0/LICENSE.txt -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal class LambdaHostContextAccessor : ILambdaHostContextAccessor { diff --git a/src/AwsLambda.Host/Core/Context/LambdaHostContextFactory.cs b/src/MinimalLambda/Core/Context/LambdaHostContextFactory.cs similarity index 98% rename from src/AwsLambda.Host/Core/Context/LambdaHostContextFactory.cs rename to src/MinimalLambda/Core/Context/LambdaHostContextFactory.cs index bf8505fa..e16f560a 100644 --- a/src/AwsLambda.Host/Core/Context/LambdaHostContextFactory.cs +++ b/src/MinimalLambda/Core/Context/LambdaHostContextFactory.cs @@ -1,7 +1,7 @@ using Amazon.Lambda.Core; using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal class LambdaHostContextFactory : ILambdaHostContextFactory { diff --git a/src/AwsLambda.Host/Core/Features/DefaultEventFeature.cs b/src/MinimalLambda/Core/Features/DefaultEventFeature.cs similarity index 97% rename from src/AwsLambda.Host/Core/Features/DefaultEventFeature.cs rename to src/MinimalLambda/Core/Features/DefaultEventFeature.cs index 263df57e..d6b7db24 100644 --- a/src/AwsLambda.Host/Core/Features/DefaultEventFeature.cs +++ b/src/MinimalLambda/Core/Features/DefaultEventFeature.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Default implementation of that is used by source generated diff --git a/src/AwsLambda.Host/Core/Features/DefaultEventFeatureProvider.cs b/src/MinimalLambda/Core/Features/DefaultEventFeatureProvider.cs similarity index 96% rename from src/AwsLambda.Host/Core/Features/DefaultEventFeatureProvider.cs rename to src/MinimalLambda/Core/Features/DefaultEventFeatureProvider.cs index 65085640..f730a6b9 100644 --- a/src/AwsLambda.Host/Core/Features/DefaultEventFeatureProvider.cs +++ b/src/MinimalLambda/Core/Features/DefaultEventFeatureProvider.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides a default implementation of for Lambda event diff --git a/src/AwsLambda.Host/Core/Features/DefaultFeatureCollection.cs b/src/MinimalLambda/Core/Features/DefaultFeatureCollection.cs similarity index 98% rename from src/AwsLambda.Host/Core/Features/DefaultFeatureCollection.cs rename to src/MinimalLambda/Core/Features/DefaultFeatureCollection.cs index 685a370c..e9c833e3 100644 --- a/src/AwsLambda.Host/Core/Features/DefaultFeatureCollection.cs +++ b/src/MinimalLambda/Core/Features/DefaultFeatureCollection.cs @@ -8,7 +8,7 @@ using System.Collections; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal class DefaultFeatureCollection : IFeatureCollection { diff --git a/src/AwsLambda.Host/Core/Features/DefaultFeatureCollectionFactory.cs b/src/MinimalLambda/Core/Features/DefaultFeatureCollectionFactory.cs similarity index 90% rename from src/AwsLambda.Host/Core/Features/DefaultFeatureCollectionFactory.cs rename to src/MinimalLambda/Core/Features/DefaultFeatureCollectionFactory.cs index ec634ac7..bdd130f6 100644 --- a/src/AwsLambda.Host/Core/Features/DefaultFeatureCollectionFactory.cs +++ b/src/MinimalLambda/Core/Features/DefaultFeatureCollectionFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal class DefaultFeatureCollectionFactory(IEnumerable providers) : IFeatureCollectionFactory diff --git a/src/AwsLambda.Host/Core/Features/DefaultResponseFeature.cs b/src/MinimalLambda/Core/Features/DefaultResponseFeature.cs similarity index 97% rename from src/AwsLambda.Host/Core/Features/DefaultResponseFeature.cs rename to src/MinimalLambda/Core/Features/DefaultResponseFeature.cs index 1ab38981..fdb6bd8c 100644 --- a/src/AwsLambda.Host/Core/Features/DefaultResponseFeature.cs +++ b/src/MinimalLambda/Core/Features/DefaultResponseFeature.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Default implementation of that is used by source diff --git a/src/AwsLambda.Host/Core/Features/DefaultResponseFeatureProvider.cs b/src/MinimalLambda/Core/Features/DefaultResponseFeatureProvider.cs similarity index 96% rename from src/AwsLambda.Host/Core/Features/DefaultResponseFeatureProvider.cs rename to src/MinimalLambda/Core/Features/DefaultResponseFeatureProvider.cs index 73e74ee6..ccc91939 100644 --- a/src/AwsLambda.Host/Core/Features/DefaultResponseFeatureProvider.cs +++ b/src/MinimalLambda/Core/Features/DefaultResponseFeatureProvider.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides a default implementation of for Lambda response diff --git a/src/AwsLambda.Host/Core/Features/EventFeatureProviderFactory.cs b/src/MinimalLambda/Core/Features/EventFeatureProviderFactory.cs similarity index 88% rename from src/AwsLambda.Host/Core/Features/EventFeatureProviderFactory.cs rename to src/MinimalLambda/Core/Features/EventFeatureProviderFactory.cs index 39b16364..dfcc61de 100644 --- a/src/AwsLambda.Host/Core/Features/EventFeatureProviderFactory.cs +++ b/src/MinimalLambda/Core/Features/EventFeatureProviderFactory.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal class EventFeatureProviderFactory(ILambdaSerializer lambdaSerializer) : IEventFeatureProviderFactory diff --git a/src/AwsLambda.Host/Core/Features/FeatureCollectionExtensions.cs b/src/MinimalLambda/Core/Features/FeatureCollectionExtensions.cs similarity index 98% rename from src/AwsLambda.Host/Core/Features/FeatureCollectionExtensions.cs rename to src/MinimalLambda/Core/Features/FeatureCollectionExtensions.cs index 74a251be..adb322e2 100644 --- a/src/AwsLambda.Host/Core/Features/FeatureCollectionExtensions.cs +++ b/src/MinimalLambda/Core/Features/FeatureCollectionExtensions.cs @@ -8,7 +8,7 @@ using System.Diagnostics.CodeAnalysis; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// Extension methods for feature collections. public static class FeatureCollectionExtensions diff --git a/src/AwsLambda.Host/Core/Features/FeatureLambdaHostContextExtensions.cs b/src/MinimalLambda/Core/Features/FeatureLambdaHostContextExtensions.cs similarity index 99% rename from src/AwsLambda.Host/Core/Features/FeatureLambdaHostContextExtensions.cs rename to src/MinimalLambda/Core/Features/FeatureLambdaHostContextExtensions.cs index 15df8b3a..53cdef8d 100644 --- a/src/AwsLambda.Host/Core/Features/FeatureLambdaHostContextExtensions.cs +++ b/src/MinimalLambda/Core/Features/FeatureLambdaHostContextExtensions.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; /// /// Provides extension methods for safely accessing typed event and response data from the diff --git a/src/AwsLambda.Host/Core/Features/IFeatureCollectionFactory.cs b/src/MinimalLambda/Core/Features/IFeatureCollectionFactory.cs similarity index 80% rename from src/AwsLambda.Host/Core/Features/IFeatureCollectionFactory.cs rename to src/MinimalLambda/Core/Features/IFeatureCollectionFactory.cs index d2db74ba..6e69a1f1 100644 --- a/src/AwsLambda.Host/Core/Features/IFeatureCollectionFactory.cs +++ b/src/MinimalLambda/Core/Features/IFeatureCollectionFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal interface IFeatureCollectionFactory { diff --git a/src/AwsLambda.Host/Core/Features/IInvocationDataFeatureFactory.cs b/src/MinimalLambda/Core/Features/IInvocationDataFeatureFactory.cs similarity index 77% rename from src/AwsLambda.Host/Core/Features/IInvocationDataFeatureFactory.cs rename to src/MinimalLambda/Core/Features/IInvocationDataFeatureFactory.cs index 103b3602..b2510c1c 100644 --- a/src/AwsLambda.Host/Core/Features/IInvocationDataFeatureFactory.cs +++ b/src/MinimalLambda/Core/Features/IInvocationDataFeatureFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal interface IInvocationDataFeatureFactory { diff --git a/src/AwsLambda.Host/Core/Features/InvocationDataFeature.cs b/src/MinimalLambda/Core/Features/InvocationDataFeature.cs similarity index 93% rename from src/AwsLambda.Host/Core/Features/InvocationDataFeature.cs rename to src/MinimalLambda/Core/Features/InvocationDataFeature.cs index dd2801ed..faa8fc03 100644 --- a/src/AwsLambda.Host/Core/Features/InvocationDataFeature.cs +++ b/src/MinimalLambda/Core/Features/InvocationDataFeature.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal sealed class InvocationDataFeature : IInvocationDataFeature { diff --git a/src/AwsLambda.Host/Core/Features/InvocationDataFeatureFactory.cs b/src/MinimalLambda/Core/Features/InvocationDataFeatureFactory.cs similarity index 87% rename from src/AwsLambda.Host/Core/Features/InvocationDataFeatureFactory.cs rename to src/MinimalLambda/Core/Features/InvocationDataFeatureFactory.cs index 6bb76438..beff05a9 100644 --- a/src/AwsLambda.Host/Core/Features/InvocationDataFeatureFactory.cs +++ b/src/MinimalLambda/Core/Features/InvocationDataFeatureFactory.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal class InvocationDataFeatureFactory : IInvocationDataFeatureFactory { diff --git a/src/AwsLambda.Host/Core/Features/ResponseFeatureProviderFactory.cs b/src/MinimalLambda/Core/Features/ResponseFeatureProviderFactory.cs similarity index 89% rename from src/AwsLambda.Host/Core/Features/ResponseFeatureProviderFactory.cs rename to src/MinimalLambda/Core/Features/ResponseFeatureProviderFactory.cs index 6196a355..53c9faca 100644 --- a/src/AwsLambda.Host/Core/Features/ResponseFeatureProviderFactory.cs +++ b/src/MinimalLambda/Core/Features/ResponseFeatureProviderFactory.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Core; +namespace MinimalLambda; internal class ResponseFeatureProviderFactory(ILambdaSerializer lambdaSerializer) : IResponseFeatureProviderFactory diff --git a/src/AwsLambda.Host/Core/Options/EnvelopeOptionsPostConfiguration.cs b/src/MinimalLambda/Core/Options/EnvelopeOptionsPostConfiguration.cs similarity index 89% rename from src/AwsLambda.Host/Core/Options/EnvelopeOptionsPostConfiguration.cs rename to src/MinimalLambda/Core/Options/EnvelopeOptionsPostConfiguration.cs index 5a85809d..e28e8398 100644 --- a/src/AwsLambda.Host/Core/Options/EnvelopeOptionsPostConfiguration.cs +++ b/src/MinimalLambda/Core/Options/EnvelopeOptionsPostConfiguration.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Options; +namespace MinimalLambda.Options; internal class EnvelopeOptionsPostConfiguration : IPostConfigureOptions { diff --git a/src/AwsLambda.Host/Core/Options/HostOptionsPostConfiguration.cs b/src/MinimalLambda/Core/Options/HostOptionsPostConfiguration.cs similarity index 95% rename from src/AwsLambda.Host/Core/Options/HostOptionsPostConfiguration.cs rename to src/MinimalLambda/Core/Options/HostOptionsPostConfiguration.cs index 10c327c3..7dd0b927 100644 --- a/src/AwsLambda.Host/Core/Options/HostOptionsPostConfiguration.cs +++ b/src/MinimalLambda/Core/Options/HostOptionsPostConfiguration.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Options; +namespace MinimalLambda.Options; internal class HostOptionsPostConfiguration : IPostConfigureOptions { diff --git a/src/AwsLambda.Host/Core/Options/LambdaApplicationOptions.cs b/src/MinimalLambda/Core/Options/LambdaApplicationOptions.cs similarity index 99% rename from src/AwsLambda.Host/Core/Options/LambdaApplicationOptions.cs rename to src/MinimalLambda/Core/Options/LambdaApplicationOptions.cs index 9b08b475..79b51b06 100644 --- a/src/AwsLambda.Host/Core/Options/LambdaApplicationOptions.cs +++ b/src/MinimalLambda/Core/Options/LambdaApplicationOptions.cs @@ -10,7 +10,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -namespace AwsLambda.Host.Builder; +namespace MinimalLambda.Builder; /// Options for configuring the . public class LambdaApplicationOptions diff --git a/src/AwsLambda.Host/Core/Options/LambdaHostOptions.cs b/src/MinimalLambda/Core/Options/LambdaHostOptions.cs similarity index 98% rename from src/AwsLambda.Host/Core/Options/LambdaHostOptions.cs rename to src/MinimalLambda/Core/Options/LambdaHostOptions.cs index c846a0ae..9b50512d 100644 --- a/src/AwsLambda.Host/Core/Options/LambdaHostOptions.cs +++ b/src/MinimalLambda/Core/Options/LambdaHostOptions.cs @@ -1,7 +1,7 @@ using Amazon.Lambda.RuntimeSupport.Bootstrap; -using AwsLambda.Host.Builder.Extensions; +using MinimalLambda.Builder.Extensions; -namespace AwsLambda.Host.Options; +namespace MinimalLambda.Options; /// Options for configuring Lambda hosting behavior. public class LambdaHostOptions diff --git a/src/AwsLambda.Host/Core/Options/LambdaHostedServiceOptions.cs b/src/MinimalLambda/Core/Options/LambdaHostedServiceOptions.cs similarity index 89% rename from src/AwsLambda.Host/Core/Options/LambdaHostedServiceOptions.cs rename to src/MinimalLambda/Core/Options/LambdaHostedServiceOptions.cs index 1cc002bc..4cd12cd4 100644 --- a/src/AwsLambda.Host/Core/Options/LambdaHostedServiceOptions.cs +++ b/src/MinimalLambda/Core/Options/LambdaHostedServiceOptions.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Options; +namespace MinimalLambda.Options; internal class LambdaHostedServiceOptions { diff --git a/src/AwsLambda.Host/Core/Options/ShutdownDuration.cs b/src/MinimalLambda/Core/Options/ShutdownDuration.cs similarity index 96% rename from src/AwsLambda.Host/Core/Options/ShutdownDuration.cs rename to src/MinimalLambda/Core/Options/ShutdownDuration.cs index 1b426e4d..92531c8e 100644 --- a/src/AwsLambda.Host/Core/Options/ShutdownDuration.cs +++ b/src/MinimalLambda/Core/Options/ShutdownDuration.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.Options; +namespace MinimalLambda.Options; /// /// Provides predetermined timeout durations for AWS Lambda shutdown based on extension diff --git a/src/MinimalLambda/GlobalUsings.cs b/src/MinimalLambda/GlobalUsings.cs new file mode 100644 index 00000000..b59a29b1 --- /dev/null +++ b/src/MinimalLambda/GlobalUsings.cs @@ -0,0 +1,4 @@ +global using MinimalLambda; +global using MinimalLambda.Builder; +global using MinimalLambda.Options; +global using MinimalLambda.Runtime; diff --git a/src/AwsLambda.Host/AwsLambda.Host.csproj b/src/MinimalLambda/MinimalLambda.csproj similarity index 64% rename from src/AwsLambda.Host/AwsLambda.Host.csproj rename to src/MinimalLambda/MinimalLambda.csproj index a479e9c5..62170951 100644 --- a/src/AwsLambda.Host/AwsLambda.Host.csproj +++ b/src/MinimalLambda/MinimalLambda.csproj @@ -8,8 +8,8 @@ true true - AwsLambda.Host - .NET Host for AWS Lambda + MinimalLambda + Minimal API-style framework for AWS Lambda functions README.md @@ -20,32 +20,20 @@ - - - - - + - - - πŸ“š **[View Full Documentation](https://j-d-ha.github.io/aws-lambda-host/)** +> πŸ“š **[View Full Documentation](https://j-d-ha.github.io/minimal-lambda/)** ## Overview -A modern .NET framework for building AWS Lambda functions using familiar ASP.NET Core patterns. The -core runtime provides: +**If you know ASP.NET Core Minimal APIs, you already know MinimalLambda.** -- **Dependency Injection**: Built-in service container for managing application dependencies -- **Middleware Pipeline**: Request/response processing similar to ASP.NET Core middleware -- **Compile-time Code Generation**: Source generators reduce reflection overhead and improve startup - performance -- **Native AOT Support**: Full compatibility with ahead-of-time compilation for minimal cold starts - and reduced package size -- **Lambda-Optimized Design**: Event handling, cold start reduction, and efficient resource - utilization tailored to AWS Lambda constraints +Write Lambda functions with the familiar minimal API pattern from ASP.NET Core: + +```csharp +var builder = LambdaApplication.CreateBuilder(); +builder.Services.AddScoped(); + +var lambda = builder.Build(); +lambda.MapHandler(([Event] string input, IMyService service) => + service.Process(input)); + +await lambda.RunAsync(); +``` + +The framework provides: + +- **Minimal API Pattern**: `lambda.MapHandler(...)` just like `app.MapGet()` – clean and declarative +- **Dependency Injection**: Same DI container as ASP.NET Core with proper scoped lifetimes per invocation +- **Middleware Pipeline**: Familiar `Use()` pattern for cross-cutting concerns +- **Source Generated**: Compile-time code generation for zero reflection overhead +- **Native AOT Ready**: Full AOT support for sub-100ms cold starts +- **Lambda-Optimized**: Automatic cancellation tokens, timeout handling, and efficient resource use ## Installation Install the NuGet package: ```bash -dotnet add package AwsLambda.Host +dotnet add package MinimalLambda ``` Ensure your project uses C# 11 or later: @@ -42,7 +53,7 @@ Ensure your project uses C# 11 or later: Create a simple Lambda handler: ```csharp -using AwsLambda.Host.Builder; +using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -213,7 +224,7 @@ public partial class SerializerContext : JsonSerializerContext; Register the serializer context with the application: ```csharp -using AwsLambda.Host; +using MinimalLambda; var builder = LambdaApplication.CreateBuilder(); @@ -256,26 +267,26 @@ builder.Services.ConfigureLambdaHostOptions(options => Available options include timeout control, shutdown duration, output formatting, and JSON serialization customization. The framework automatically registers `DefaultLambdaHostJsonSerializer` which uses `JsonSerializerOptions` and `JsonWriterOptions` for all Lambda serialization. See -the [configuration guide](https://github.com/j-d-ha/aws-lambda-host/wiki/Configuration) for details. +the [configuration guide](https://github.com/j-d-ha/minimal-lambda/wiki/Configuration) for details. ## Other Packages -Additional packages in the aws-lambda-host framework for abstractions, observability, and event +Additional packages in the minimal-lambda framework for abstractions, observability, and event source handling. | Package | NuGet | Downloads | |-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [**AwsLambda.Host**](../AwsLambda.Host/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.svg)](https://www.nuget.org/packages/AwsLambda.Host/) | -| [**AwsLambda.Host.Abstractions**](../AwsLambda.Host.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Abstractions.svg)](https://www.nuget.org/packages/AwsLambda.Host.Abstractions/) | -| [**AwsLambda.Host.OpenTelemetry**](../AwsLambda.Host.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.OpenTelemetry.svg)](https://www.nuget.org/packages/AwsLambda.Host.OpenTelemetry/) | -| [**AwsLambda.Host.Envelopes.Sqs**](../Envelopes/AwsLambda.Host.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sqs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sqs/) | -| [**AwsLambda.Host.Envelopes.ApiGateway**](../Envelopes/AwsLambda.Host.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.ApiGateway/) | -| [**AwsLambda.Host.Envelopes.Sns**](../Envelopes/AwsLambda.Host.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Sns.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Sns/) | -| [**AwsLambda.Host.Envelopes.Kinesis**](../Envelopes/AwsLambda.Host.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kinesis/) | -| [**AwsLambda.Host.Envelopes.KinesisFirehose**](../Envelopes/AwsLambda.Host.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.KinesisFirehose/) | -| [**AwsLambda.Host.Envelopes.Kafka**](../Envelopes/AwsLambda.Host.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Kafka.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Kafka/) | -| [**AwsLambda.Host.Envelopes.CloudWatchLogs**](../Envelopes/AwsLambda.Host.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.CloudWatchLogs/) | -| [**AwsLambda.Host.Envelopes.Alb**](../Envelopes/AwsLambda.Host.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/AwsLambda.Host.Envelopes.Alb.svg)](https://www.nuget.org/packages/AwsLambda.Host.Envelopes.Alb/) | +| [**MinimalLambda**](../MinimalLambda/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.svg)](https://www.nuget.org/packages/MinimalLambda/) | +| [**MinimalLambda.Abstractions**](../MinimalLambda.Abstractions/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Abstractions.svg)](https://www.nuget.org/packages/MinimalLambda.Abstractions/) | +| [**MinimalLambda.OpenTelemetry**](../MinimalLambda.OpenTelemetry/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.OpenTelemetry.svg)](https://www.nuget.org/packages/MinimalLambda.OpenTelemetry/) | +| [**MinimalLambda.Envelopes.Sqs**](../Envelopes/MinimalLambda.Envelopes.Sqs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sqs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sqs/) | +| [**MinimalLambda.Envelopes.ApiGateway**](../Envelopes/MinimalLambda.Envelopes.ApiGateway/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.ApiGateway.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.ApiGateway/) | +| [**MinimalLambda.Envelopes.Sns**](../Envelopes/MinimalLambda.Envelopes.Sns/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Sns.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Sns/) | +| [**MinimalLambda.Envelopes.Kinesis**](../Envelopes/MinimalLambda.Envelopes.Kinesis/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kinesis.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kinesis/) | +| [**MinimalLambda.Envelopes.KinesisFirehose**](../Envelopes/MinimalLambda.Envelopes.KinesisFirehose/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.KinesisFirehose.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.KinesisFirehose/) | +| [**MinimalLambda.Envelopes.Kafka**](../Envelopes/MinimalLambda.Envelopes.Kafka/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Kafka.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Kafka/) | +| [**MinimalLambda.Envelopes.CloudWatchLogs**](../Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.CloudWatchLogs.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.CloudWatchLogs/) | +| [**MinimalLambda.Envelopes.Alb**](../Envelopes/MinimalLambda.Envelopes.Alb/README.md) | [![NuGet](https://img.shields.io/nuget/v/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb) | [![Downloads](https://img.shields.io/nuget/dt/MinimalLambda.Envelopes.Alb.svg)](https://www.nuget.org/packages/MinimalLambda.Envelopes.Alb/) | ## License diff --git a/src/AwsLambda.Host/Runtime/ILambdaBootstrapOrchestrator.cs b/src/MinimalLambda/Runtime/ILambdaBootstrapOrchestrator.cs similarity index 97% rename from src/AwsLambda.Host/Runtime/ILambdaBootstrapOrchestrator.cs rename to src/MinimalLambda/Runtime/ILambdaBootstrapOrchestrator.cs index 85b95951..3dbdea09 100644 --- a/src/AwsLambda.Host/Runtime/ILambdaBootstrapOrchestrator.cs +++ b/src/MinimalLambda/Runtime/ILambdaBootstrapOrchestrator.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Runtime; +namespace MinimalLambda.Runtime; /// /// Responsible for orchestrating the AWS Lambda bootstrap. Abstracts away AWS SDK complexity diff --git a/src/AwsLambda.Host/Runtime/ILambdaHandlerFactory.cs b/src/MinimalLambda/Runtime/ILambdaHandlerFactory.cs similarity index 96% rename from src/AwsLambda.Host/Runtime/ILambdaHandlerFactory.cs rename to src/MinimalLambda/Runtime/ILambdaHandlerFactory.cs index cb1f3621..f75a6a6b 100644 --- a/src/AwsLambda.Host/Runtime/ILambdaHandlerFactory.cs +++ b/src/MinimalLambda/Runtime/ILambdaHandlerFactory.cs @@ -1,6 +1,6 @@ using Amazon.Lambda.Core; -namespace AwsLambda.Host.Runtime; +namespace MinimalLambda.Runtime; /// /// Responsible for creating and composing the Lambda handler. Handles middleware pipeline diff --git a/src/AwsLambda.Host/Runtime/LambdaBootstrapAdapter.cs b/src/MinimalLambda/Runtime/LambdaBootstrapAdapter.cs similarity index 98% rename from src/AwsLambda.Host/Runtime/LambdaBootstrapAdapter.cs rename to src/MinimalLambda/Runtime/LambdaBootstrapAdapter.cs index 6dc13276..3ed17e18 100644 --- a/src/AwsLambda.Host/Runtime/LambdaBootstrapAdapter.cs +++ b/src/MinimalLambda/Runtime/LambdaBootstrapAdapter.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Runtime; +namespace MinimalLambda.Runtime; /// /// Adapts AWS Lambda bootstrap configuration and execution. This class abstracts away AWS SDK diff --git a/src/AwsLambda.Host/Runtime/LambdaHandlerComposer.cs b/src/MinimalLambda/Runtime/LambdaHandlerComposer.cs similarity index 99% rename from src/AwsLambda.Host/Runtime/LambdaHandlerComposer.cs rename to src/MinimalLambda/Runtime/LambdaHandlerComposer.cs index b1c1ec9c..5b2d8807 100644 --- a/src/AwsLambda.Host/Runtime/LambdaHandlerComposer.cs +++ b/src/MinimalLambda/Runtime/LambdaHandlerComposer.cs @@ -1,7 +1,7 @@ using Amazon.Lambda.Core; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Runtime; +namespace MinimalLambda.Runtime; /// Builds and composes the Lambda invocation pipeline into a request handler. internal sealed class LambdaHandlerComposer : ILambdaHandlerFactory diff --git a/src/AwsLambda.Host/Runtime/LambdaHostedService.cs b/src/MinimalLambda/Runtime/LambdaHostedService.cs similarity index 99% rename from src/AwsLambda.Host/Runtime/LambdaHostedService.cs rename to src/MinimalLambda/Runtime/LambdaHostedService.cs index 15c8530d..7557a17a 100644 --- a/src/AwsLambda.Host/Runtime/LambdaHostedService.cs +++ b/src/MinimalLambda/Runtime/LambdaHostedService.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.Runtime; +namespace MinimalLambda.Runtime; /// /// Orchestrates the Lambda hosting environment lifecycle. Delegates specific concerns to diff --git a/src/MinimalLambda/build/MinimalLambda.targets b/src/MinimalLambda/build/MinimalLambda.targets new file mode 100644 index 00000000..0bb634b4 --- /dev/null +++ b/src/MinimalLambda/build/MinimalLambda.targets @@ -0,0 +1,7 @@ + + + + $(InterceptorsPreviewNamespaces);MinimalLambda.Generated + + + diff --git a/tasks/FormattingTasks.yml b/tasks/FormattingTasks.yml index d503097a..71ed9f57 100644 --- a/tasks/FormattingTasks.yml +++ b/tasks/FormattingTasks.yml @@ -17,8 +17,8 @@ tasks: - echo "πŸ”§ Running CleanupCode for code cleanup and style enforcement..." - | dotnet jb cleanupcode \ - AwsLambda.Host.sln \ - --settings="AwsLambda.Host.sln.DotSettings" \ + MinimalLambda.sln \ + --settings="MinimalLambda.sln.DotSettings" \ --profile="Full Cleanup Custom" \ --verbosity=INFO \ --no-build diff --git a/tasks/PublishTasks.yml b/tasks/PublishTasks.yml index be460e2f..6812f8d0 100644 --- a/tasks/PublishTasks.yml +++ b/tasks/PublishTasks.yml @@ -31,13 +31,13 @@ tasks: - echo "πŸ” Validating all versions" - task: validate_version vars: - DIR: src/AwsLambda.Host + DIR: src/MinimalLambda - task: validate_version vars: - DIR: src/AwsLambda.Host.Abstractions + DIR: src/MinimalLambda.Abstractions - task: validate_version vars: - DIR: src/AwsLambda.Host.OpenTelemetry + DIR: src/MinimalLambda.OpenTelemetry - echo "πŸš€ Publishing all packages" - task: publish - echo "✨ All packages published successfully!" diff --git a/tasks/TestTasks.yml b/tasks/TestTasks.yml index d8275c5d..92b53388 100644 --- a/tasks/TestTasks.yml +++ b/tasks/TestTasks.yml @@ -30,7 +30,7 @@ tasks: silent: true cmds: - echo "πŸ‘€ Starting test watch mode" - - dotnet watch --project tests/AwsLambda.Host.Tests test --configuration Release + - dotnet watch --project tests/MinimalLambda.Tests test --configuration Release verbose: desc: Run tests with detailed output for debugging diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_DeserializerSerializer_NoOp#LambdaHandler.g.verified.cs b/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_DeserializerSerializer_NoOp#LambdaHandler.g.verified.cs deleted file mode 100644 index 0a7ba418..00000000 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_DeserializerSerializer_NoOp#LambdaHandler.g.verified.cs +++ /dev/null @@ -1,27 +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("AwsLambda.Host.SourceGenerators", "0.0.0")] - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_NoOp#LambdaHandler.g.verified.cs b/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_NoOp#LambdaHandler.g.verified.cs deleted file mode 100644 index 0a7ba418..00000000 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_MainOverload_NoOp#LambdaHandler.g.verified.cs +++ /dev/null @@ -1,27 +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("AwsLambda.Host.SourceGenerators", "0.0.0")] - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_BaseMethodCall#LambdaHandler.g.verified.cs b/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_BaseMethodCall#LambdaHandler.g.verified.cs deleted file mode 100644 index 0a7ba418..00000000 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_BaseMethodCall#LambdaHandler.g.verified.cs +++ /dev/null @@ -1,27 +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("AwsLambda.Host.SourceGenerators", "0.0.0")] - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BaseMethodCall#LambdaHandler.g.verified.cs b/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BaseMethodCall#LambdaHandler.g.verified.cs deleted file mode 100644 index 0a7ba418..00000000 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BaseMethodCall#LambdaHandler.g.verified.cs +++ /dev/null @@ -1,27 +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("AwsLambda.Host.SourceGenerators", "0.0.0")] - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] - file sealed class InterceptsLocationAttribute : Attribute - { - public InterceptsLocationAttribute(int version, string data) - { - } - } -} diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/AlbRequestEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/AlbRequestEnvelopeTests.cs similarity index 96% rename from tests/AwsLambda.Host.Envelopes.UnitTests/AlbRequestEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/AlbRequestEnvelopeTests.cs index 3178c663..6fed499e 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/AlbRequestEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/AlbRequestEnvelopeTests.cs @@ -3,12 +3,12 @@ using Amazon.Lambda.ApplicationLoadBalancerEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.Alb; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.Alb; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(AlbRequestEnvelope<>))] public class AlbRequestEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/AlbResponseEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/AlbResponseEnvelopeTests.cs similarity index 97% rename from tests/AwsLambda.Host.Envelopes.UnitTests/AlbResponseEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/AlbResponseEnvelopeTests.cs index ed6e1b97..b925c331 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/AlbResponseEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/AlbResponseEnvelopeTests.cs @@ -3,12 +3,12 @@ using Amazon.Lambda.ApplicationLoadBalancerEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.Alb; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.Alb; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(AlbResponseEnvelope<>))] public class AlbResponseEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayRequestEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayRequestEnvelopeTests.cs similarity index 97% rename from tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayRequestEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayRequestEnvelopeTests.cs index 361f2237..4d9b88a1 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayRequestEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayRequestEnvelopeTests.cs @@ -3,12 +3,12 @@ using Amazon.Lambda.APIGatewayEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.ApiGateway; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.ApiGateway; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(ApiGatewayRequestEnvelope<>))] public class ApiGatewayRequestEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayResponseEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayResponseEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayResponseEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayResponseEnvelopeTests.cs index ff64d20a..f370ef60 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayResponseEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayResponseEnvelopeTests.cs @@ -3,12 +3,12 @@ using Amazon.Lambda.APIGatewayEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.ApiGateway; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.ApiGateway; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(ApiGatewayResponseEnvelope<>))] public class ApiGatewayResponseEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayV2RequestEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayV2RequestEnvelopeTests.cs similarity index 97% rename from tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayV2RequestEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayV2RequestEnvelopeTests.cs index e6abaff4..a6f6e207 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayV2RequestEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayV2RequestEnvelopeTests.cs @@ -3,12 +3,12 @@ using Amazon.Lambda.APIGatewayEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.ApiGateway; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.ApiGateway; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(ApiGatewayV2RequestEnvelope<>))] public class ApiGatewayV2RequestEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayV2ResponseEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayV2ResponseEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayV2ResponseEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayV2ResponseEnvelopeTests.cs index 70c32099..90a7962c 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/ApiGatewayV2ResponseEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/ApiGatewayV2ResponseEnvelopeTests.cs @@ -3,12 +3,12 @@ using Amazon.Lambda.APIGatewayEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.ApiGateway; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.ApiGateway; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(ApiGatewayV2ResponseEnvelope<>))] public class ApiGatewayV2ResponseEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/CloudWatchLogsEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/CloudWatchLogsEnvelopeTests.cs similarity index 99% rename from tests/AwsLambda.Host.Envelopes.UnitTests/CloudWatchLogsEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/CloudWatchLogsEnvelopeTests.cs index 5c1237f8..1845c2f2 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/CloudWatchLogsEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/CloudWatchLogsEnvelopeTests.cs @@ -5,12 +5,12 @@ using Amazon.Lambda.CloudWatchLogsEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.CloudWatchLogs; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.CloudWatchLogs; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(CloudWatchLogsEnvelope<>))] [TestSubject(typeof(CloudWatchLogsEnvelope))] diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/KafkaEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/KafkaEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/KafkaEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/KafkaEnvelopeTests.cs index 01e60564..05f3d97e 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/KafkaEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/KafkaEnvelopeTests.cs @@ -4,12 +4,12 @@ using Amazon.Lambda.KafkaEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.Kafka; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.Kafka; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(KafkaEnvelope<>))] public class KafkaEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/KinesisEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/KinesisEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/KinesisEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/KinesisEnvelopeTests.cs index 9ca78a5a..b622885b 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/KinesisEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/KinesisEnvelopeTests.cs @@ -4,12 +4,12 @@ using Amazon.Lambda.KinesisEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.Kinesis; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.Kinesis; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(KinesisEnvelope<>))] public class KinesisEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/KinesisFirehoseEventEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/KinesisFirehoseEventEnvelopeTests.cs similarity index 97% rename from tests/AwsLambda.Host.Envelopes.UnitTests/KinesisFirehoseEventEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/KinesisFirehoseEventEnvelopeTests.cs index 1d02e60e..2948f9c1 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/KinesisFirehoseEventEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/KinesisFirehoseEventEnvelopeTests.cs @@ -4,12 +4,12 @@ using Amazon.Lambda.KinesisFirehoseEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.KinesisFirehose; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.KinesisFirehose; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(KinesisFirehoseEventEnvelope<>))] public class KinesisFirehoseEventEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/KinesisFirehoseResponseEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/KinesisFirehoseResponseEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/KinesisFirehoseResponseEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/KinesisFirehoseResponseEnvelopeTests.cs index 5614efca..a2bfecca 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/KinesisFirehoseResponseEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/KinesisFirehoseResponseEnvelopeTests.cs @@ -4,12 +4,12 @@ using Amazon.Lambda.KinesisFirehoseEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.KinesisFirehose; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.KinesisFirehose; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(KinesisFirehoseResponseEnvelope<>))] public class KinesisFirehoseResponseEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/AwsLambda.Host.Envelopes.UnitTests.csproj b/tests/MinimalLambda.Envelopes.UnitTests/MinimalLambda.Envelopes.UnitTests.csproj similarity index 53% rename from tests/AwsLambda.Host.Envelopes.UnitTests/AwsLambda.Host.Envelopes.UnitTests.csproj rename to tests/MinimalLambda.Envelopes.UnitTests/MinimalLambda.Envelopes.UnitTests.csproj index 8229101e..e6b4c2bf 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/AwsLambda.Host.Envelopes.UnitTests.csproj +++ b/tests/MinimalLambda.Envelopes.UnitTests/MinimalLambda.Envelopes.UnitTests.csproj @@ -24,13 +24,13 @@ - - - - - - - - + + + + + + + + diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/SnsEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/SnsEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/SnsEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/SnsEnvelopeTests.cs index 5e626e75..e8a9f3ac 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/SnsEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/SnsEnvelopeTests.cs @@ -3,12 +3,12 @@ using Amazon.Lambda.SNSEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.Sns; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.Sns; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(SnsEnvelope<>))] public class SnsEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/SqsEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/SqsEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/SqsEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/SqsEnvelopeTests.cs index 96b30ad1..394b4d01 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/SqsEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/SqsEnvelopeTests.cs @@ -3,13 +3,13 @@ using Amazon.Lambda.SQSEvents; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.Sqs; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.Sqs; +using MinimalLambda.Options; using Xunit; using SQSMessage = Amazon.Lambda.SQSEvents.SQSEvent.SQSMessage; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(SqsEnvelope<>))] public class SqsEnvelopeTests diff --git a/tests/AwsLambda.Host.Envelopes.UnitTests/SqsSnsEnvelopeTests.cs b/tests/MinimalLambda.Envelopes.UnitTests/SqsSnsEnvelopeTests.cs similarity index 98% rename from tests/AwsLambda.Host.Envelopes.UnitTests/SqsSnsEnvelopeTests.cs rename to tests/MinimalLambda.Envelopes.UnitTests/SqsSnsEnvelopeTests.cs index 9c41f2f2..c4007361 100644 --- a/tests/AwsLambda.Host.Envelopes.UnitTests/SqsSnsEnvelopeTests.cs +++ b/tests/MinimalLambda.Envelopes.UnitTests/SqsSnsEnvelopeTests.cs @@ -1,13 +1,13 @@ using System.Text.Json; using AutoFixture; using AwesomeAssertions; -using AwsLambda.Host.Envelopes.Sns; -using AwsLambda.Host.Envelopes.Sqs; -using AwsLambda.Host.Options; using JetBrains.Annotations; +using MinimalLambda.Envelopes.Sns; +using MinimalLambda.Envelopes.Sqs; +using MinimalLambda.Options; using Xunit; -namespace AwsLambda.Host.Envelopes.UnitTests; +namespace MinimalLambda.Envelopes.UnitTests; [TestSubject(typeof(SqsSnsEnvelope<>))] public class SqsSnsEnvelopeTests diff --git a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/AutoNSubstituteDataAttribute.cs b/tests/MinimalLambda.OpenTelemetry.UnitTests/AutoNSubstituteDataAttribute.cs similarity index 92% rename from tests/AwsLambda.Host.OpenTelemetry.UnitTests/AutoNSubstituteDataAttribute.cs rename to tests/MinimalLambda.OpenTelemetry.UnitTests/AutoNSubstituteDataAttribute.cs index 1c549b23..7746bf6c 100644 --- a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/AutoNSubstituteDataAttribute.cs +++ b/tests/MinimalLambda.OpenTelemetry.UnitTests/AutoNSubstituteDataAttribute.cs @@ -1,6 +1,6 @@ using AutoFixture.AutoNSubstitute; -namespace AwsLambda.Host.UnitTests; +namespace MinimalLambda.UnitTests; public class AutoNSubstituteDataAttribute() : AutoDataAttribute(() => diff --git a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/GlobalUsings.cs b/tests/MinimalLambda.OpenTelemetry.UnitTests/GlobalUsings.cs similarity index 55% rename from tests/AwsLambda.Host.OpenTelemetry.UnitTests/GlobalUsings.cs rename to tests/MinimalLambda.OpenTelemetry.UnitTests/GlobalUsings.cs index d3b1a14d..02d205b2 100644 --- a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/GlobalUsings.cs +++ b/tests/MinimalLambda.OpenTelemetry.UnitTests/GlobalUsings.cs @@ -1,10 +1,7 @@ global using AutoFixture; global using AutoFixture.Xunit3; global using AwesomeAssertions; -global using AwsLambda.Host; -global using AwsLambda.Host.Builder; -global using AwsLambda.Host.Core; -global using AwsLambda.Host.Options; global using JetBrains.Annotations; +global using MinimalLambda.Builder; global using NSubstitute; global using Xunit; diff --git a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/LambdaOpenTelemetryServiceProviderExtensionsTests.cs b/tests/MinimalLambda.OpenTelemetry.UnitTests/LambdaOpenTelemetryServiceProviderExtensionsTests.cs similarity index 99% rename from tests/AwsLambda.Host.OpenTelemetry.UnitTests/LambdaOpenTelemetryServiceProviderExtensionsTests.cs rename to tests/MinimalLambda.OpenTelemetry.UnitTests/LambdaOpenTelemetryServiceProviderExtensionsTests.cs index f62c038f..22d5d446 100644 --- a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/LambdaOpenTelemetryServiceProviderExtensionsTests.cs +++ b/tests/MinimalLambda.OpenTelemetry.UnitTests/LambdaOpenTelemetryServiceProviderExtensionsTests.cs @@ -1,8 +1,8 @@ -using AwsLambda.Host.UnitTests; using Microsoft.Extensions.DependencyInjection; +using MinimalLambda.UnitTests; using OpenTelemetry.Trace; -namespace AwsLambda.Host.OpenTelemetry.UnitTests; +namespace MinimalLambda.OpenTelemetry.UnitTests; [TestSubject(typeof(LambdaOpenTelemetryServiceProviderExtensions))] public class LambdaOpenTelemetryServiceProviderExtensionsTests diff --git a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/MiddlewareOpenTelemetryExtensionsTest.cs b/tests/MinimalLambda.OpenTelemetry.UnitTests/MiddlewareOpenTelemetryExtensionsTest.cs similarity index 97% rename from tests/AwsLambda.Host.OpenTelemetry.UnitTests/MiddlewareOpenTelemetryExtensionsTest.cs rename to tests/MinimalLambda.OpenTelemetry.UnitTests/MiddlewareOpenTelemetryExtensionsTest.cs index f5b4e94a..301d7564 100644 --- a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/MiddlewareOpenTelemetryExtensionsTest.cs +++ b/tests/MinimalLambda.OpenTelemetry.UnitTests/MiddlewareOpenTelemetryExtensionsTest.cs @@ -1,7 +1,7 @@ -using AwsLambda.Host.UnitTests; +using MinimalLambda.UnitTests; using OpenTelemetry.Trace; -namespace AwsLambda.Host.OpenTelemetry.UnitTests; +namespace MinimalLambda.OpenTelemetry.UnitTests; [TestSubject(typeof(MiddlewareOpenTelemetryExtensions))] public class MiddlewareOpenTelemetryExtensionsTest diff --git a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/AwsLambda.Host.OpenTelemetry.UnitTests.csproj b/tests/MinimalLambda.OpenTelemetry.UnitTests/MinimalLambda.OpenTelemetry.UnitTests.csproj similarity index 87% rename from tests/AwsLambda.Host.OpenTelemetry.UnitTests/AwsLambda.Host.OpenTelemetry.UnitTests.csproj rename to tests/MinimalLambda.OpenTelemetry.UnitTests/MinimalLambda.OpenTelemetry.UnitTests.csproj index 05ee5da8..4d2e6a12 100644 --- a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/AwsLambda.Host.OpenTelemetry.UnitTests.csproj +++ b/tests/MinimalLambda.OpenTelemetry.UnitTests/MinimalLambda.OpenTelemetry.UnitTests.csproj @@ -30,7 +30,7 @@ - - + + diff --git a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/OnShutdownOpenTelemetryExtensionsTests.cs b/tests/MinimalLambda.OpenTelemetry.UnitTests/OnShutdownOpenTelemetryExtensionsTests.cs similarity index 95% rename from tests/AwsLambda.Host.OpenTelemetry.UnitTests/OnShutdownOpenTelemetryExtensionsTests.cs rename to tests/MinimalLambda.OpenTelemetry.UnitTests/OnShutdownOpenTelemetryExtensionsTests.cs index 41a23fec..4640433a 100644 --- a/tests/AwsLambda.Host.OpenTelemetry.UnitTests/OnShutdownOpenTelemetryExtensionsTests.cs +++ b/tests/MinimalLambda.OpenTelemetry.UnitTests/OnShutdownOpenTelemetryExtensionsTests.cs @@ -5,7 +5,7 @@ using OpenTelemetry.Metrics; using OpenTelemetry.Trace; -namespace AwsLambda.Host.OpenTelemetry.UnitTests; +namespace MinimalLambda.OpenTelemetry.UnitTests; [TestSubject(typeof(OnShutdownOpenTelemetryExtensions))] public class OnShutdownOpenTelemetryExtensionsTests @@ -90,7 +90,7 @@ public async Task OnShutdownFlushTracer_RegistersShutdownHandler_AndSuccessfully new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry tracer provider force flush succeeded", } ); @@ -125,7 +125,7 @@ public async Task OnShutdownFlushTracer_RegistersShutdownHandler_AndFailedFlushe new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry tracer provider force flush failed", } ); @@ -160,7 +160,7 @@ public async Task OnShutdownFlushTracer_RegistersShutdownHandler_AndCanceledFlus new { Level = LogLevel.Warning, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry tracer provider force flush failed to complete within allocated time", } ); @@ -248,7 +248,7 @@ public async Task OnShutdownFlushMeter_RegistersShutdownHandler_AndSuccessfullyF new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry meter provider force flush succeeded", } ); @@ -283,7 +283,7 @@ public async Task OnShutdownFlushMeter_RegistersShutdownHandler_AndFailedFlushes new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry meter provider force flush failed", } ); @@ -318,7 +318,7 @@ public async Task OnShutdownFlushMeter_RegistersShutdownHandler_AndCanceledFlush new { Level = LogLevel.Warning, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry meter provider force flush failed to complete within allocated time", } ); @@ -408,7 +408,7 @@ public async Task OnShutdownFlushOpenTelemetry_BothFlushesBothSucceed() new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry meter provider force flush succeeded", } ) @@ -416,7 +416,7 @@ public async Task OnShutdownFlushOpenTelemetry_BothFlushesBothSucceed() new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry tracer provider force flush succeeded", } ); @@ -451,7 +451,7 @@ public async Task OnShutdownFlushOpenTelemetry_TracerFailsButMeterSucceeds() new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry meter provider force flush succeeded", } ) @@ -459,7 +459,7 @@ public async Task OnShutdownFlushOpenTelemetry_TracerFailsButMeterSucceeds() new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry tracer provider force flush failed", } ); @@ -494,7 +494,7 @@ public async Task OnShutdownFlushOpenTelemetry_MeterFailsButTracerSucceeds() new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry meter provider force flush failed", } ) @@ -502,7 +502,7 @@ public async Task OnShutdownFlushOpenTelemetry_MeterFailsButTracerSucceeds() new { Level = LogLevel.Information, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry tracer provider force flush succeeded", } ); @@ -542,7 +542,7 @@ public async Task OnShutdownFlushOpenTelemetry_BothFlushesTimeout() new { Level = LogLevel.Warning, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry meter provider force flush failed to complete within allocated time", } ) @@ -550,7 +550,7 @@ public async Task OnShutdownFlushOpenTelemetry_BothFlushesTimeout() new { Level = LogLevel.Warning, - Category = "AwsLambda.Host.OpenTelemetry", + Category = "MinimalLambda.OpenTelemetry", Message = "OpenTelemetry tracer provider force flush failed to complete within allocated time", } ); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/DiagnosticTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/DiagnosticTests.cs similarity index 90% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/DiagnosticTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/DiagnosticTests.cs index 2f289aed..363d35f6 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/DiagnosticTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/DiagnosticTests.cs @@ -3,7 +3,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public class MapHandlerIncrementalGeneratorDiagnosticTests { @@ -12,8 +12,8 @@ public void Test_MultipleMapHandlersNotFound() { var diagnostics = GenerateDiagnostics( """ - using AwsLambda.Host; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -34,8 +34,8 @@ public void Test_MultipleMapHandlersFound() { var diagnostics = GenerateDiagnostics( """ - using AwsLambda.Host; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -58,8 +58,8 @@ public void Test_MultipleParametersWithRequestAttribute() { var diagnostics = GenerateDiagnostics( """ - using AwsLambda.Host; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -86,8 +86,8 @@ public void Test_KeyedService_InvalidKey_Array() { var diagnostics = GenerateDiagnostics( """ - using AwsLambda.Host; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -127,8 +127,8 @@ public void Test_CSharpVersionTooLow() { var diagnostics = GenerateDiagnostics( """ - using AwsLambda.Host; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/GeneratorTestHelpers.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/GeneratorTestHelpers.cs similarity index 95% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/GeneratorTestHelpers.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/GeneratorTestHelpers.cs index 8b283f9f..6ec047af 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/GeneratorTestHelpers.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/GeneratorTestHelpers.cs @@ -3,16 +3,15 @@ using Amazon.Lambda.RuntimeSupport; using Amazon.Lambda.Serialization.SystemTextJson; using AwesomeAssertions; -using AwsLambda.Host.Builder; -using AwsLambda.Host.Core; using Basic.Reference.Assemblies; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; +using MinimalLambda.Builder; -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; internal static class GeneratorTestHelpers { @@ -66,7 +65,7 @@ internal static (GeneratorDriver driver, Compilation compilation) GenerateFromSo { IEnumerable> features = [ - new("InterceptorsNamespaces", "AwsLambda.Host"), + new("InterceptorsNamespaces", "MinimalLambda"), ]; var parseOptions = CSharpParseOptions @@ -108,7 +107,7 @@ .. Net90.References.All.ToList(), ); var generator = new MapHandlerIncrementalGenerator( - "AwsLambda.Host.SourceGenerators", + "MinimalLambda.SourceGenerators", "0.0.0" ).AsSourceGenerator(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/AwsLambda.Host.SourceGenerators.UnitTests.csproj b/tests/MinimalLambda.SourceGenerators.UnitTests/MinimalLambda.SourceGenerators.UnitTests.csproj similarity index 82% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/AwsLambda.Host.SourceGenerators.UnitTests.csproj rename to tests/MinimalLambda.SourceGenerators.UnitTests/MinimalLambda.SourceGenerators.UnitTests.csproj index 0397ca40..fe7e7424 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/AwsLambda.Host.SourceGenerators.UnitTests.csproj +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/MinimalLambda.SourceGenerators.UnitTests.csproj @@ -33,10 +33,10 @@ - - - - + + + + diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/ModuleInitializer.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/ModuleInitializer.cs similarity index 76% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/ModuleInitializer.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/ModuleInitializer.cs index 8c13202f..44910f9a 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/ModuleInitializer.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/ModuleInitializer.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public static class ModuleInitializer { diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs similarity index 91% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs index 9bec200a..d98e066e 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_AllInputSources#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(14,8) - [InterceptsLocation(1, "wCxh64raLv7JZxUcekz6bkIBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "VP2f+uiZdS+PotWEzQbiljsBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -81,7 +81,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService?, Name = service3, Source = Service, IsNullable = True, IsOptional = False} var arg6 = context.ServiceProvider.GetService(); castHandler.Invoke(arg0, arg1, arg2, arg3, arg4, arg5, arg6); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs index 2822f220..766b7934 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_Async_ReturnTaskString_TypeCast#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "52YQ/UddFuGQH5asNzsp/L0AAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "RRgc5MNn+AL4pWTKQhrXsLYAAABJbnB1dEZpbGUuY3M=")] 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; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs similarity index 86% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs index 3d363f12..0e2b0530 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoReturn_TypeCast#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "24NtoO22UPa+/C0ogM3RV+EAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "ng4qOHWnkJh4C4VlurOGMtoAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -67,7 +67,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService, Name = service, Source = Service, IsNullable = False, IsOptional = False} var arg1 = context.ServiceProvider.GetRequiredService(); castHandler.Invoke(arg0, arg1); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs index 6c37b765..a84f597d 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_NoTypeInfo_TypeCast#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "jx1Tqmn1fJ3pftRGtSvbSsMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "uvqLvSSclxUXzwz2YmfzRrwAAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -72,7 +72,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs index 447689f9..ad101d36 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnExplicitType#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "kmm35a5GJaoqey+0CeV8vdMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "w4moLaByZsxXLuN4WecQp8wAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -77,7 +77,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'global::IService' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs index 0410bb7b..8a4d7091 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnImplicitNullable#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(8,8) - [InterceptsLocation(1, "qgvWtxWrBmeBTRBtlT5A2LUAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "DqY8rinA+uHB6sl663XA8a4AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -77,7 +77,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string?' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs index e2ca8757..cef6f817 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnString#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(8,8) - [InterceptsLocation(1, "SBl4e782DgMu+0FLfrzfUbUAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "4KtVaSPugK/Yn6yEqkiSkq4AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -75,7 +75,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs index b51ae0fc..bafd7788 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnTaskString#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(12,8) - [InterceptsLocation(1, "62ICm9hMTMkVRHJf7bEM0v4AAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "o/ULBbkPcz16o9tbQ0tOEPcAAABJbnB1dEZpbGUuY3M=")] 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; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs index f75bd5b0..0816cbf6 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_ReturnsTask_TypeCast#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "hQoB+WlSjNRKx1YwYlKZW70AAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "2aTdwJdHl473WaMveiNuirYAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs similarity index 83% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs index d39dfe67..d814c365 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_StreamResponse#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,40 +26,40 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "6HO/UYhbMUo2aMF5OFFj3scAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "jPT53Ewh7xx9P9yb1DeyM8AAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) { var response = castHandler.Invoke(); context.Features.GetRequired().ResponseStream = response; - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs index 15af876e..b5b5f3b8 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "0swNLwUGxn6gmcAxLw2VYcMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "SZ39GgPCyw+sAyqV7Y0MlLwAAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -70,7 +70,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs index ae5c5d4c..d331ced7 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/BlockLambdaVerifyTests.Test_BlockLambda_TypeCast_InputFromKeyedServices#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(11,8) - [InterceptsLocation(1, "Uxt0NUyaj58kybSiao2f8REBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "2G3T5x4NjDpOFGweblm35AoBAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -74,7 +74,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs index 91c2af82..5556169d 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationToken#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "IG1FKecgSQVVqxQ3PHQPeM0AAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "uuDt15jObMe1Qq8s3gllzMYAAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -70,7 +70,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs index 3c4fe28d..b5a09837 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaContext#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "wn/8VnbL6/5enHoptgINB+cAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "E0m79hZz+OhoP5DYhe70YeAAAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -72,7 +72,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.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 similarity index 80% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaHostContext#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_AsksForCancellationTokenAndLambdaHostContext#LambdaHandler.g.verified.cs index 99f4180c..9dcd01b5 100644 --- a/tests/AwsLambda.Host.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 @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,45 +26,45 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "f2st4QpM87EqtO+5cVLplOcAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "FpwfFi8HLWXcIbdaQfstO+AAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { - var castHandler = (global::System.Func)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(ILambdaHostContext context) { // ParameterInfo { Type = global::System.Threading.CancellationToken, Name = ct, Source = CancellationToken, IsNullable = False, IsOptional = False} var arg0 = context.CancellationToken; - // ParameterInfo { Type = global::AwsLambda.Host.Core.ILambdaHostContext, Name = ctx, Source = Context, IsNullable = False, IsOptional = False} + // ParameterInfo { Type = global::MinimalLambda.ILambdaHostContext, Name = ctx, Source = Context, IsNullable = False, IsOptional = False} var arg1 = context; var response = castHandler.Invoke(arg0, arg1); if (context.Features.Get() is not IResponseFeature responseFeature) @@ -72,7 +72,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs index cb67dd68..11082dca 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_Async_ReturnExplicitTask#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "cms2w+IHinDN9XOT4+diatMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "cT3iuq87IWiCDKzjFXbX3swAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs similarity index 90% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs index 1f5e12be..9426fe5a 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ComplexInput_ComplexOutput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "YAIayk0naS2HI+NqiUzlmO0AAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "ixKezoN6SQ9ZJuIWXUEMnOYAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs similarity index 82% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs index b9127749..2f19755a 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ExplicitVoid#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,39 +26,39 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(11,8) - [InterceptsLocation(1, "S8za7TGX8LSwYna0cXthvuAAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "mCw0TmMoKLslRA4zotAzTtkAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) { castHandler.Invoke(); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs similarity index 89% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs index a688a8ba..6aa3fc24 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_Async#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "K/A2Yp4hzHbk21l61w6haLYAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "MM4MsQPkcbIYHWAtaye0xa8AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs similarity index 89% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs index 64622794..f9105d82 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputDi_AsyncAndAwait#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "VH5MZQ3KsBJFkPsnivxIPdQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "gPwlNZ7yUMUE03RWPlHggc0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.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#LambdaHandler.g.verified.cs similarity index 90% rename from tests/AwsLambda.Host.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#LambdaHandler.g.verified.cs index f6621812..fbb57fd5 100644 --- a/tests/AwsLambda.Host.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#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(11,8) - [InterceptsLocation(1, "2v0Mx0/EAUlNqfkx9U5JLucAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "8WhODzG6WGWPy7Q+FAmYNuAAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs index 71622551..6cc7aecb 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_InputStream#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "EIytviO7ID8d+8z3oQ4Pu8cAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "kMEdRureGinS9vjuOg9cX8AAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -60,7 +60,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::System.IO.Stream, Name = input, Source = Event, IsNullable = False, IsOptional = False} var arg0 = context.Features.GetRequired().EventStream; castHandler.Invoke(arg0); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs similarity index 82% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs index 2e7f3425..fc457c5e 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_NoOutput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,39 +26,39 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "YIbj7XiC2amhwIlyj2HW1bYAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "3CWFbmqnBB4YxhpsZbBulq8AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) { castHandler.Invoke(); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs similarity index 86% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs index e4ddccae..ec9235fe 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnGenericObject#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(8,8) - [InterceptsLocation(1, "XdsFhkLY1aZYCRYD2HXHFrUAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "G4Om3+ihXcYexFMvnSQvJ64AAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'global::Response' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs similarity index 85% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs index b56aa222..05be05e2 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnNullablePrimitive#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(8,8) - [InterceptsLocation(1, "fUFDCv62We6/lGMG9FpYS7UAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "JhcPD8PsJIdWe6XLFN10+a4AAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'int?' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs similarity index 85% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs index 1c0443c1..a5f9ac70 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NoInput_ReturnString#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "Ta7Dv3cnwIzvY2JBRc5ijLYAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "in+uvLWWJ/AtKXn3ATT2fa8AAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs index 3915a303..b6338c5d 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnExplicitNullable#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(8,8) - [InterceptsLocation(1, "xtIY1NRH4poO99GLmpoGnbUAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "EDNz6e5tefnWkx5Bq6QB3K4AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -77,7 +77,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string?' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs index 4291d3bb..7f5a552e 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_NullableInput_ReturnImplicitNullable#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(8,8) - [InterceptsLocation(1, "qtXEOV1k02+RkXoOA59GBrUAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "hQau9yVjg5Tk/d7+kjXPVa4AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -77,7 +77,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string?' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs index 742b789b..3a6e8de8 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitTask#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "UWCFzECps5Zv/K6OoUlGmtMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "KJD4PMoAebDtIgB60tZNgswAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs index 16eb612f..9086c67c 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/ExpressionLambdaVerifyTests.Test_ExpressionLambda_ReturnExplicitType#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "4J9qyNm4aQaoE9yV4I7wUNMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "bLWvoKINhFpNDAVeDD/J9swAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -75,7 +75,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'global::IService' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs index dbbc06aa..a6929d4c 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_FloatingPointTypes#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(12,8) - [InterceptsLocation(1, "Zx6wWbKlfl6HcErqMOpfK2EBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "oOoX2Z8lm6heONKgRuSEMVoBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -66,7 +66,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService, Name = serviceB, Source = KeyedService, IsNullable = False, IsOptional = False, KeyedServiceKeyInfo { DisplayValue = (float)3.14, Type = float, BaseType = global::System.ValueType } } var arg1 = context.ServiceProvider.GetRequiredKeyedService((float)3.14); castHandler.Invoke(arg0, arg1); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs index 6f7e81db..84c351ac 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_IntAndLongKeys#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(12,8) - [InterceptsLocation(1, "XD0eRdQJ2xwEO5+zwdJ8IV0BAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "UQNgECJiz6f37Kqrohi6T1YBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -66,7 +66,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService, Name = serviceB, Source = KeyedService, IsNullable = False, IsOptional = False, KeyedServiceKeyInfo { DisplayValue = (long)42, Type = long, BaseType = global::System.ValueType } } var arg1 = context.ServiceProvider.GetRequiredKeyedService((long)42); castHandler.Invoke(arg0, arg1); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs similarity index 90% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs index 55a711ad..af67de00 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_OtherTypes#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(14,8) - [InterceptsLocation(1, "FPApiCPACeBSE0aOLeXmruQBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "hmegcgWk2t+EeA09rekjfN0BAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -70,7 +70,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService, Name = serviceD, Source = KeyedService, IsNullable = False, IsOptional = False, KeyedServiceKeyInfo { DisplayValue = null, Type = object, BaseType = } } var arg3 = context.ServiceProvider.GetRequiredKeyedService(null); castHandler.Invoke(arg0, arg1, arg2, arg3); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs similarity index 89% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs index 5ef64501..db0706ec 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_SmallIntegerTypes#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(13,8) - [InterceptsLocation(1, "N8+wyBYUokyoNUAIxBkzoqsBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "hw5rLqU36tq+UKKZjsYo+6QBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService, Name = serviceC, Source = KeyedService, IsNullable = False, IsOptional = False, KeyedServiceKeyInfo { DisplayValue = (sbyte)42, Type = sbyte, BaseType = global::System.ValueType } } var arg2 = context.ServiceProvider.GetRequiredKeyedService((sbyte)42); castHandler.Invoke(arg0, arg1, arg2); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs similarity index 89% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs index c4c66f24..9e245e3c 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_StringAndEnumKeys#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(13,8) - [InterceptsLocation(1, "rMkFDEUYJ34h2/gSzQaFl7YBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "+h6TuNWWRrZ6456NGR3gY68BAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService, Name = serviceC, Source = KeyedService, IsNullable = False, IsOptional = False, KeyedServiceKeyInfo { DisplayValue = (global::ServiceType)1, Type = global::ServiceType, BaseType = global::System.Enum } } var arg2 = context.ServiceProvider.GetRequiredKeyedService((global::ServiceType)1); castHandler.Invoke(arg0, arg1, arg2); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs similarity index 89% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs index 94940e25..8243d625 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/KeyedServiceVerifyTests.Test_KeyedService_UnsignedIntegerTypes#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(13,8) - [InterceptsLocation(1, "3eiN2asEW2/G+R1Aj4dbcqIBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "AxgJhn/c6EE+EjInktbZjJsBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) // ParameterInfo { Type = global::IService, Name = serviceC, Source = KeyedService, IsNullable = False, IsOptional = False, KeyedServiceKeyInfo { DisplayValue = (ushort)42, Type = ushort, BaseType = global::System.ValueType } } var arg2 = context.ServiceProvider.GetRequiredKeyedService((ushort)42); castHandler.Invoke(arg0, arg1, arg2); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs similarity index 82% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs index d680e850..c4c248b5 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_AsyncVoid#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,39 +26,39 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "z6sS8Y9yXWmqDTL/J/JyOsMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "KboCfbbG13nfDrp0SLg8M7wAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) { castHandler.Invoke(); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs index e0ae781e..92ed4fe2 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_Async_ReturnTaskString#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "W6/BEm8FxiRW0gVV9g5fFtMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "ZkrKvKVefW15Q5g1yuxuRcwAAABJbnB1dEZpbGUuY3M=")] 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; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs similarity index 90% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs index e73ca3cb..1eecad0b 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_InputDiKeyedServices#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,43 +26,43 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(11,8) - [InterceptsLocation(1, "8oeVcVLGeqitmbmG/7HeZwABAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "b0D41RfIehIYSzpiKIsdyfkAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + if (!application.Properties.ContainsKey(EventFeatureProviderKey)) application.Properties[EventFeatureProviderKey] = application .Services.GetRequiredService() .Create(); - + if (!application.Properties.ContainsKey(ResponseFeatureProviderKey)) application.Properties[ResponseFeatureProviderKey] = application. Services.GetRequiredService() .Create(); - + return application; Task InvocationDelegate(ILambdaHostContext context) @@ -83,7 +83,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'string' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs similarity index 85% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs index 5650dddd..2cfd58fe 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_BlockBody_TypeCast#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "I4oSgX2EhCjJlUv+muXhcMMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "9iVXmQzdmOJRzQb10S6vbbwAAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'int' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.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#LambdaHandler.g.verified.cs similarity index 85% rename from tests/AwsLambda.Host.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#LambdaHandler.g.verified.cs index 7ceff931..a36b2475 100644 --- a/tests/AwsLambda.Host.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#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "MYd9JR07N7unKiyCLFng0cMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "WkNvIuTbAdwaZik4NmqZnLwAAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'int' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs similarity index 82% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs index 6280b42d..0711fa78 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_NoInput_NoOutput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,39 +26,39 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "FboZTyPPzSjZNNWYolhn08MAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "+Lz+jm6gwTdwCiVkSNzQ87wAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + application.Handle(InvocationDelegate); - + return application; Task InvocationDelegate(ILambdaHostContext context) { castHandler.Invoke(); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs index 7019b5bd..95f7b33b 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTask#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,33 +26,33 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "x4hOcx/Mdm3QPU6QMU8PCtMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "JJAuncCVlvzsQmF1nMYHRMwAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaInvocationBuilder MapHandlerInterceptor0( this ILambdaInvocationBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + application.Handle(InvocationDelegate); - + return application; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs index 65925787..529a3a25 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_ReturnTaskString#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "rezyXVdhsY66Ems4DFa9p9MAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "/Yux3FXySiMlCW6XCvraq8wAAABJbnB1dEZpbGUuY3M=")] 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; async Task InvocationDelegate(ILambdaHostContext context) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs similarity index 85% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs index de5c2b88..2b862a26 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/MethodHandlerVerifyTests.Test_MethodHandler_TypeCast_ExtraParentheses#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,38 +26,38 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; using System.Runtime.CompilerServices; using System.Threading.Tasks; - using AwsLambda.Host.Builder; - using AwsLambda.Host.Core; + using MinimalLambda.Builder; + using MinimalLambda; using Microsoft.Extensions.DependencyInjection; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaInvocationBuilderExtensions { private const string EventFeatureProviderKey = "__EventFeatureProvider"; private const string ResponseFeatureProviderKey = "__ResponseFeatureProvider"; - + // Location: InputFile.cs(9,8) - [InterceptsLocation(1, "3PhYgT8MPlODZy+E9raU0cMAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "B3NwPy0yR+xRbgA9x8f/e7wAAABJbnB1dEZpbGUuY3M=")] 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(ILambdaHostContext context) @@ -68,7 +68,7 @@ Task InvocationDelegate(ILambdaHostContext context) throw new InvalidOperationException($"Response feature for type 'int' is not available in the collection."); } responseFeature.SetResponse(response); - return Task.CompletedTask; + return Task.CompletedTask; } } } diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs index cb509016..c40732b9 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_ExplicitReturnTypeAsync#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "B75vzDHbMAaDhY3yPDqta9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "q1uiaF3q8+xYajQEZyxaiM0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs similarity index 86% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs index fdf3271e..e470c3e7 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDi#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "kxwv6MRO7ICWs0/b3FHQYdQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "GvWtmkGvhj2sJm4/rXiUGc0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = global::IService, Name = service, Source = Service, IsNullable = False, IsOptional = False} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs similarity index 86% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs index c3be8b7c..0645999b 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "0/e3oTWVwerLdIUT9JSUddQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "8o56Zwu2oVW8FXpGxJSFvc0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + async Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = global::IService, Name = service, Source = Service, IsNullable = False, IsOptional = False} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs index 4fac26bf..0cbeee79 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MethodHandler_NoDi#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(12,8) - [InterceptsLocation(1, "J+znASUyU6XOeL5I7F4a2u4AAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "3ivf5JplhmGDGF7iXdWVSucAAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs index ffa8d89c..56bbbaac 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_MultipleCalls#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "WS5xwmfdbttlkCDwmVN/4dQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "gOjUxL7brRqHQuY3oQ1zfc0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); @@ -58,16 +58,16 @@ Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellati } // Location: InputFile.cs(15,8) - [InterceptsLocation(1, "WS5xwmfdbttlkCDwmVN/4RwBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "gOjUxL7brRqHQuY3oQ1zfRUBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor1( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string?, Name = x, Source = Service, IsNullable = True, IsOptional = False} @@ -80,16 +80,16 @@ Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellati } // Location: InputFile.cs(22,8) - [InterceptsLocation(1, "WS5xwmfdbttlkCDwmVN/4YEBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "gOjUxL7brRqHQuY3oQ1zfXoBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor2( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string, Name = x, Source = Service, IsNullable = False, IsOptional = False} diff --git a/tests/AwsLambda.Host.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 similarity index 97% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput#LambdaHandler.g.verified.cs index f0e1a2ac..f5d720e3 100644 --- a/tests/AwsLambda.Host.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 @@ -23,14 +23,14 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host +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) @@ -44,8 +44,8 @@ Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellati { return handler(); } - + return application.OnInit(OnInit); } } -} \ No newline at end of file +} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs index 8b714fe9..6c745345 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_NoOutput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "DJFXn3qtRzPpemNQ7yH2j9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "muLM5AWLiyZcBDFwDjSMbc0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs index df732b9c..e10e3849 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnAsyncBool#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "/9UlP4Hk4OFxTvOz4lI3ztQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "itVOIXgsd2/a5q0mYhXydM0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs index b5cb6dba..c188896d 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnBool#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "bfzzWql3BD1qSjdb9bBzM9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "dCq2ERewPXxHvi/4iSh/m80AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs index a77f3065..3b79131d 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedType#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "4+YRMciUNXwEwXhvIACxZ9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "7+o+H0MkQG+24GOQUPBdDs0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs index e185e626..6f5180f3 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeAsync#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "NcMerHwPBzsgxA7y/XPnH9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "pi9PolKCGMrmFvoC3ft/Oc0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + async Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { await castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs index 08f2a165..f5f0bdca 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnNotExpectedTypeTask#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "9fSKeCRgj7MIXk9wvEO289QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "Vg2L2eBzhOCM6KRY6cER2c0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + async Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { await castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs index 0e082f1b..f49bbb7e 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NoInput_ReturnTaskBool#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "CDEFUo2VYVYEIicqNdjtudQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "cTRqoX+dJLMMKMOCOmOufs0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs index 622ef238..4d54b558 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "r7SIx1Ceo55ncYApA9O0wtQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "dsRnyqNCGlvINFkBECwmUs0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string?, Name = x, Source = Service, IsNullable = True, IsOptional = False} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs similarity index 91% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs index bcc90a41..5039e172 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(12,8) - [InterceptsLocation(1, "mD/AfkPVjS93ZD5vENLVJBwBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "s9lx/eNP9F4h61w7TOvQPRUBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { if (serviceProvider.GetService() is not IServiceProviderIsKeyedService) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs index a8d672a5..c78843c8 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnInitVerifyTests.Test_OnInit_PrimitiveInput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnInitBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "4H720O/JvOGs29mmtmYgitQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "8J01folJ0MDOTLxLNRx4fs0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnInitBuilder OnInitInterceptor0( this ILambdaOnInitBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnInit(OnInit); - + Task OnInit(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string, Name = x, Source = Service, IsNullable = False, IsOptional = False} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs index 8cdb556b..8d336389 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_BlockLambda_ReturnsImplicitVoid#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "JG45SVupAX32PicMEg4KYMQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "lPDnfssMibsxhX79gLd2lL0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Action)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs similarity index 88% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs index a21a7379..44543c55 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_MultipleCalls#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "8z0FL9iGVp57G+1Z1fBD39QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "W852isYQO43ObWn6kxnU5s0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); @@ -58,16 +58,16 @@ Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellation } // Location: InputFile.cs(15,8) - [InterceptsLocation(1, "8z0FL9iGVp57G+1Z1fBD3xcBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "W852isYQO43ObWn6kxnU5hABAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor1( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string?, Name = x, Source = Service, IsNullable = True, IsOptional = False} @@ -80,16 +80,16 @@ Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellation } // Location: InputFile.cs(22,8) - [InterceptsLocation(1, "8z0FL9iGVp57G+1Z1fBD34IBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "W852isYQO43ObWn6kxnU5nsBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor2( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string, Name = x, Source = Service, IsNullable = False, IsOptional = False} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs similarity index 85% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs index 2cbcf78a..c41f0702 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "qjTMZJmT/ICwyqjvKYAro9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "F/zSODBMGX3Xez9u/iwpl80AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { var response = castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs index b7be06a8..f463885d 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedType#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "xOmLseZGX64ZVN3IS0hGL9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "Cr7Neg3slUnAi5SjcvJU580AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs index e8c28781..6c047447 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "nxe3yEiiRmdYDNQcN1k3hdQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "YWaX0vtU1wLdNqf9cuGdFM0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnShutdown(OnShutdown); - + async Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { await castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs similarity index 84% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs index 5d5d7841..08fc3161 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "2tTPAN/rsaZuzGty9hzBK9QAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "12DeS9LwHN3iO8NwFisQBs0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func>)handler; - + return application.OnShutdown(OnShutdown); - + async Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { await castHandler.Invoke(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs index bf74bdaf..9c14af0f 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_NullableValueAndReferenceInputs#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "UPiaK81+RguBpV3LlTD6qtQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "BGCXXs9bVPwLCAUaU8Kkds0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string?, Name = x, Source = Service, IsNullable = True, IsOptional = False} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs similarity index 92% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs index 6dc057d1..cf2fff7a 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_OneOfEachPossibleKindOfInput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(12,8) - [InterceptsLocation(1, "YiehluDLQPPtk+Ko8lbJChwBAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "ZhdnggwSuJq0NpRZew7QhhUBAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { if (serviceProvider.GetService() is not IServiceProviderIsKeyedService) diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs index d888bebc..c3617add 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/OnShutdownVerifyTests.Test_OnShutdown_PrimitiveInput#LambdaHandler.g.verified.cs @@ -15,8 +15,8 @@ namespace System.Runtime.CompilerServices { using System.CodeDom.Compiler; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] file sealed class InterceptsLocationAttribute : Attribute { @@ -26,7 +26,7 @@ public InterceptsLocationAttribute(int version, string data) } } -namespace AwsLambda.Host.Core.Generated +namespace MinimalLambda.Generated { using System; using System.CodeDom.Compiler; @@ -34,22 +34,22 @@ namespace AwsLambda.Host.Core.Generated using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; - using AwsLambda.Host.Builder; - - [GeneratedCode("AwsLambda.Host.SourceGenerators", "0.0.0")] + using MinimalLambda.Builder; + + [GeneratedCode("MinimalLambda.SourceGenerators", "0.0.0")] file static class GeneratedLambdaOnShutdownBuilderExtensions { // Location: InputFile.cs(10,8) - [InterceptsLocation(1, "QR3PHAM1SBBcUgDZGFYhBtQAAABJbnB1dEZpbGUuY3M=")] + [InterceptsLocation(1, "cuXlRiXWvhKK6Ao4rCbyic0AAABJbnB1dEZpbGUuY3M=")] internal static ILambdaOnShutdownBuilder OnShutdownInterceptor0( this ILambdaOnShutdownBuilder application, Delegate handler ) { var castHandler = (global::System.Func)handler; - + return application.OnShutdown(OnShutdown); - + Task OnShutdown(IServiceProvider serviceProvider, CancellationToken cancellationToken) { // ParameterInfo { Type = string, Name = x, Source = Service, IsNullable = False, IsOptional = False} diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Types/EquatableArrayTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Types/EquatableArrayTests.cs similarity index 99% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Types/EquatableArrayTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Types/EquatableArrayTests.cs index 422a09cf..f366a168 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Types/EquatableArrayTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Types/EquatableArrayTests.cs @@ -1,9 +1,9 @@ using System.Collections; using AwesomeAssertions; -using AwsLambda.Host.SourceGenerators.Types; using JetBrains.Annotations; +using MinimalLambda.SourceGenerators.Types; -namespace AwsLambda.Host.SourceGenerators.UnitTests.Types; +namespace MinimalLambda.SourceGenerators.UnitTests.Types; [TestSubject(typeof(EquatableArray<>))] public class EquatableArrayTests diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Types/HashCodeTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/Types/HashCodeTests.cs similarity index 99% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/Types/HashCodeTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/Types/HashCodeTests.cs index 8c3410ef..1ab10f3e 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/Types/HashCodeTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/Types/HashCodeTests.cs @@ -1,8 +1,8 @@ using AwesomeAssertions; using JetBrains.Annotations; -using HashCode = AwsLambda.Host.SourceGenerators.Types.HashCode; +using HashCode = MinimalLambda.SourceGenerators.Types.HashCode; -namespace AwsLambda.Host.SourceGenerators.UnitTests.Types; +namespace MinimalLambda.SourceGenerators.UnitTests.Types; [TestSubject(typeof(HashCode))] public class HashCodeTests diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/BlockLambdaVerifyTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/BlockLambdaVerifyTests.cs similarity index 89% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/BlockLambdaVerifyTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/BlockLambdaVerifyTests.cs index 87d6b667..910dd3a2 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/BlockLambdaVerifyTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/BlockLambdaVerifyTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public class BlockLambdaVerifyTests { @@ -7,8 +7,8 @@ public async Task Test_BlockLambda_ReturnExplicitType() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -49,8 +49,8 @@ public class OtherService : IService public async Task Test_BlockLambda_ReturnString() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -73,8 +73,8 @@ await GeneratorTestHelpers.Verify( """ using System; using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -106,8 +106,8 @@ await GeneratorTestHelpers.Verify( """ using System; using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; var builder = LambdaApplication.CreateBuilder(); var lambda = builder.Build(); @@ -129,8 +129,8 @@ await GeneratorTestHelpers.Verify( """ using System; using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; var builder = LambdaApplication.CreateBuilder(); var lambda = builder.Build(); @@ -144,8 +144,8 @@ public async Task Test_BlockLambda_TypeCast() => await GeneratorTestHelpers.Verify( """ using System; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -175,8 +175,8 @@ public async Task Test_BlockLambda_NoTypeInfo_TypeCast() => await GeneratorTestHelpers.Verify( """ using System; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -207,8 +207,8 @@ await GeneratorTestHelpers.Verify( """ using System; using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -236,8 +236,8 @@ public interface IService public async Task Test_BlockLambda_ReturnImplicitNullable() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -264,8 +264,8 @@ public async Task Test_BlockLambda_StreamResponse() => await GeneratorTestHelpers.Verify( """ using System.IO; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -284,8 +284,8 @@ await GeneratorTestHelpers.Verify( """ using System.Threading; using Amazon.Lambda.Core; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -321,8 +321,8 @@ public async Task Test_BlockLambda_ReturnTaskString() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/ExpressionLambdaVerifyTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/ExpressionLambdaVerifyTests.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/ExpressionLambdaVerifyTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/ExpressionLambdaVerifyTests.cs index bce47a67..2c8efdad 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/ExpressionLambdaVerifyTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/ExpressionLambdaVerifyTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public class ExpressionLambdaVerifyTests { @@ -7,8 +7,8 @@ public async Task Test_ExpressionLambda_MainOverload_NoOp() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -18,7 +18,8 @@ await GeneratorTestHelpers.Verify( lambda.Handle(Task (ILambdaHostContext context) => Task.CompletedTask); await lambda.RunAsync(); - """ + """, + 0 ); [Fact] @@ -28,8 +29,8 @@ await GeneratorTestHelpers.Verify( using System.IO; using System.Threading.Tasks; using Amazon.Lambda.Core; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -39,15 +40,16 @@ await GeneratorTestHelpers.Verify( lambda.Handle(Task (ILambdaHostContext context) => Task.CompletedTask); await lambda.RunAsync(); - """ + """, + 0 ); [Fact] public async Task Test_ExpressionLambda_NoInput_NoOutput() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -64,8 +66,8 @@ await GeneratorTestHelpers.Verify( public async Task Test_ExpressionLambda_NoInput_ReturnString() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -82,8 +84,8 @@ await GeneratorTestHelpers.Verify( public async Task Test_ExpressionLambda_NoInput_ReturnNullablePrimitive() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -99,8 +101,8 @@ await GeneratorTestHelpers.Verify( public async Task Test_ExpressionLambda_NoInput_ReturnGenericObject() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -120,8 +122,8 @@ record Data(string Message); public async Task Test_ExpressionLambda_InputDi_Async() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -146,8 +148,8 @@ public async Task Test_ExpressionLambda_InputDi_AsyncAndAwait() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -172,8 +174,8 @@ public async Task Test_ExpressionLambda_InputDi_AsyncAndAwait_EventAndResponseDi await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; using MyNamespace; @@ -207,8 +209,8 @@ public async Task Test_ExpressionLambda_ReturnExplicitType() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -242,8 +244,8 @@ public class OtherService : IService public async Task Test_ExpressionLambda_NullableInput_ReturnImplicitNullable() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -264,8 +266,8 @@ public interface IService public async Task Test_ExpressionLambda_NullableInput_ReturnExplicitNullable() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -290,8 +292,8 @@ await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; using Amazon.Lambda.Core; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -328,8 +330,8 @@ public async Task Test_ExpressionLambda_Async_ReturnExplicitTask() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -346,8 +348,8 @@ public async Task Test_ExpressionLambda_ReturnExplicitTask() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -367,8 +369,8 @@ public async Task Test_ExpressionLambda_AsksForCancellationToken() => await GeneratorTestHelpers.Verify( """ using System.Threading; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -386,8 +388,8 @@ await GeneratorTestHelpers.Verify( """ using System.Threading; using Amazon.Lambda.Core; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -405,8 +407,8 @@ await GeneratorTestHelpers.Verify( """ using System.Threading; using Amazon.Lambda.Core; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -423,8 +425,8 @@ public async Task Test_ExpressionLambda_InputStream() => await GeneratorTestHelpers.Verify( """ using System.IO; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -441,8 +443,8 @@ await GeneratorTestHelpers.Verify( public async Task Test_ExpressionLambda_ExplicitVoid() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/KeyedServiceVerifyTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/KeyedServiceVerifyTests.cs similarity index 92% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/KeyedServiceVerifyTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/KeyedServiceVerifyTests.cs index e3eedf8d..960e179f 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/KeyedServiceVerifyTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/KeyedServiceVerifyTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public class KeyedServiceVerifyTests { @@ -6,8 +6,8 @@ public class KeyedServiceVerifyTests public async Task Test_KeyedService_StringAndEnumKeys() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -50,8 +50,8 @@ public class Service : IService public async Task Test_KeyedService_IntAndLongKeys() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -83,8 +83,8 @@ public class Service : IService public async Task Test_KeyedService_SmallIntegerTypes() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -121,8 +121,8 @@ public class Service : IService public async Task Test_KeyedService_UnsignedIntegerTypes() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -159,8 +159,8 @@ public class Service : IService public async Task Test_KeyedService_FloatingPointTypes() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -195,8 +195,8 @@ public class Service : IService public async Task Test_KeyedService_OtherTypes() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/OnInitVerifyTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/OnInitVerifyTests.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/OnInitVerifyTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/OnInitVerifyTests.cs index 2368a9d2..7dbb1bc1 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/OnInitVerifyTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/OnInitVerifyTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public class OnInitVerifyTests { @@ -6,8 +6,8 @@ public class OnInitVerifyTests public async Task Test_OnInit_BaseMethodCall() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -22,7 +22,8 @@ await GeneratorTestHelpers.Verify( ); await lambda.RunAsync(); - """ + """, + 0 ); [Fact] @@ -30,8 +31,8 @@ public async Task Test_OnInit_ExplicitReturnTypeAsync() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -52,8 +53,8 @@ public async Task Test_OnInit_NoInput_NoOutput() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -71,8 +72,8 @@ public async Task Test_OnInit_NoInput_ReturnBool() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -90,8 +91,8 @@ public async Task Test_OnInit_NoInput_ReturnTaskBool() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -109,8 +110,8 @@ public async Task Test_OnInit_NoInput_ReturnAsyncBool() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -128,8 +129,8 @@ public async Task Test_OnInit_NoInput_ReturnNotExpectedType() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -147,8 +148,8 @@ public async Task Test_OnInit_NoInput_ReturnNotExpectedTypeTask() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -166,8 +167,8 @@ public async Task Test_OnInit_NoInput_ReturnNotExpectedTypeAsync() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -185,8 +186,8 @@ public async Task Test_OnInit_PrimitiveInput() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -209,8 +210,8 @@ public async Task Test_OnInit_NullableValueAndReferenceInputs() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -239,8 +240,8 @@ await GeneratorTestHelpers.Verify( """ using System.Threading; using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -275,8 +276,8 @@ public async Task Test_OnInit_MultipleCalls() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -316,8 +317,8 @@ public async Task Test_OnInit_MethodHandler_NoDi() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -343,8 +344,8 @@ public async Task Test_OnInit_MethodHandler_AsyncAndDi() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -375,8 +376,8 @@ public async Task Test_OnInit_MethodHandler_AsyncAndDiAndReturnUnexpectedType() await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/OnShutdownVerifyTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/OnShutdownVerifyTests.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/OnShutdownVerifyTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/OnShutdownVerifyTests.cs index 7bf0299b..21f93c92 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/OnShutdownVerifyTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/OnShutdownVerifyTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public class OnShutdownVerifyTests { @@ -6,8 +6,8 @@ public class OnShutdownVerifyTests public async Task Test_OnShutdown_BaseMethodCall() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -22,7 +22,8 @@ await GeneratorTestHelpers.Verify( ); await lambda.RunAsync(); - """ + """, + 0 ); [Fact] @@ -30,8 +31,8 @@ public async Task Test_OnShutdown_NoInput() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -52,8 +53,8 @@ public async Task Test_OnShutdown_NoInput_ReturnUnexpectedType() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -74,8 +75,8 @@ public async Task Test_OnShutdown_NoInput_ReturnUnexpectedTypeTask() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -96,8 +97,8 @@ public async Task Test_OnShutdown_NoInput_ReturnUnexpectedTypeAsync() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -118,8 +119,8 @@ public async Task Test_OnShutdown_PrimitiveInput() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -142,8 +143,8 @@ public async Task Test_OnShutdown_NullableValueAndReferenceInputs() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -172,8 +173,8 @@ await GeneratorTestHelpers.Verify( """ using System.Threading; using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -208,8 +209,8 @@ public async Task Test_OnShutdown_MultipleCalls() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -248,8 +249,8 @@ public interface IService public async Task Test_OnShutdown_BlockLambda_ReturnsImplicitVoid() => await GeneratorTestHelpers.Verify( """ - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; using System; diff --git a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/StaticMethodVerifyTests.cs b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/StaticMethodVerifyTests.cs similarity index 87% rename from tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/StaticMethodVerifyTests.cs rename to tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/StaticMethodVerifyTests.cs index db375985..a47c5b83 100644 --- a/tests/AwsLambda.Host.SourceGenerators.UnitTests/VerifyTests/StaticMethodVerifyTests.cs +++ b/tests/MinimalLambda.SourceGenerators.UnitTests/VerifyTests/StaticMethodVerifyTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.SourceGenerators.UnitTests; +namespace MinimalLambda.SourceGenerators.UnitTests; public class MethodHandlerVerifyTests { @@ -7,8 +7,8 @@ public async Task Test_MethodHandler_NoInput_NoOutput() => await GeneratorTestHelpers.Verify( """ using System; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -32,8 +32,8 @@ public async Task Test_MethodHandler_BlockBody_InputDiKeyedServices() => await GeneratorTestHelpers.Verify( """ using Amazon.Lambda.Core; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -69,8 +69,8 @@ public async Task Test_MethodHandler_BlockBody_TypeCast_Static() => await GeneratorTestHelpers.Verify( """ using System; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -92,8 +92,8 @@ public async Task Test_MethodHandler_BlockBody_TypeCast() => await GeneratorTestHelpers.Verify( """ using System; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -118,8 +118,8 @@ public async Task Test_MethodHandler_TypeCast_ExtraParentheses() => await GeneratorTestHelpers.Verify( """ using System; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -141,8 +141,8 @@ public async Task Test_MethodHandler_ReturnTask() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -166,8 +166,8 @@ public async Task Test_MethodHandler_ReturnTaskString() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -191,8 +191,8 @@ public async Task Test_MethodHandler_Async_ReturnTaskString() => await GeneratorTestHelpers.Verify( """ using System.Threading.Tasks; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); @@ -216,8 +216,8 @@ public async Task Test_MethodHandler_AsyncVoid() => await GeneratorTestHelpers.Verify( """ using System; - using AwsLambda.Host.Core; - using AwsLambda.Host.Builder; + using MinimalLambda; + using MinimalLambda.Builder; using Microsoft.Extensions.Hosting; var builder = LambdaApplication.CreateBuilder(); diff --git a/tests/AwsLambda.Host.UnitTests/AutoNSubstituteDataAttribute.cs b/tests/MinimalLambda.UnitTests/AutoNSubstituteDataAttribute.cs similarity index 92% rename from tests/AwsLambda.Host.UnitTests/AutoNSubstituteDataAttribute.cs rename to tests/MinimalLambda.UnitTests/AutoNSubstituteDataAttribute.cs index 1c549b23..7746bf6c 100644 --- a/tests/AwsLambda.Host.UnitTests/AutoNSubstituteDataAttribute.cs +++ b/tests/MinimalLambda.UnitTests/AutoNSubstituteDataAttribute.cs @@ -1,6 +1,6 @@ using AutoFixture.AutoNSubstitute; -namespace AwsLambda.Host.UnitTests; +namespace MinimalLambda.UnitTests; public class AutoNSubstituteDataAttribute() : AutoDataAttribute(() => diff --git a/tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaInvocationBuilderFactoryTests.cs b/tests/MinimalLambda.UnitTests/Builder/DefaultLambdaInvocationBuilderFactoryTests.cs similarity index 97% rename from tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaInvocationBuilderFactoryTests.cs rename to tests/MinimalLambda.UnitTests/Builder/DefaultLambdaInvocationBuilderFactoryTests.cs index 7c1b2e4c..dd695bde 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaInvocationBuilderFactoryTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/DefaultLambdaInvocationBuilderFactoryTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Builder; +namespace MinimalLambda.UnitTests.Builder; [TestSubject(typeof(DefaultLambdaInvocationBuilderFactory))] public class DefaultLambdaInvocationBuilderFactoryTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaOnInitBuilderFactoryTests.cs b/tests/MinimalLambda.UnitTests/Builder/DefaultLambdaOnInitBuilderFactoryTests.cs similarity index 98% rename from tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaOnInitBuilderFactoryTests.cs rename to tests/MinimalLambda.UnitTests/Builder/DefaultLambdaOnInitBuilderFactoryTests.cs index e6e5399a..d58a0a29 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaOnInitBuilderFactoryTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/DefaultLambdaOnInitBuilderFactoryTests.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.UnitTests.Builder; +namespace MinimalLambda.UnitTests.Builder; [TestSubject(typeof(DefaultLambdaOnInitBuilderFactory))] public class DefaultLambdaOnInitBuilderFactoryTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaOnShutdownBuilderFactoryTests.cs b/tests/MinimalLambda.UnitTests/Builder/DefaultLambdaOnShutdownBuilderFactoryTests.cs similarity index 98% rename from tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaOnShutdownBuilderFactoryTests.cs rename to tests/MinimalLambda.UnitTests/Builder/DefaultLambdaOnShutdownBuilderFactoryTests.cs index 8d31fc72..0f3d6db5 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/DefaultLambdaOnShutdownBuilderFactoryTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/DefaultLambdaOnShutdownBuilderFactoryTests.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.UnitTests.Builder; +namespace MinimalLambda.UnitTests.Builder; [TestSubject(typeof(DefaultLambdaOnShutdownBuilderFactory))] public class DefaultLambdaOnShutdownBuilderFactoryTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/ConfigurationServiceCollectionExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Builder/Extensions/ConfigurationServiceCollectionExtensionsTests.cs similarity index 98% rename from tests/AwsLambda.Host.UnitTests/Builder/Extensions/ConfigurationServiceCollectionExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Builder/Extensions/ConfigurationServiceCollectionExtensionsTests.cs index 932c00dc..477c00cd 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/ConfigurationServiceCollectionExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/Extensions/ConfigurationServiceCollectionExtensionsTests.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.UnitTests.Builder.Extensions; +namespace MinimalLambda.UnitTests.Builder.Extensions; // Source file is in Microsoft.Extensions.DependencyInjection namespace diff --git a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/LambdaHttpClientServiceCollectionExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Builder/Extensions/LambdaHttpClientServiceCollectionExtensionsTests.cs similarity index 98% rename from tests/AwsLambda.Host.UnitTests/Builder/Extensions/LambdaHttpClientServiceCollectionExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Builder/Extensions/LambdaHttpClientServiceCollectionExtensionsTests.cs index 7eb29534..1a0e6276 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/LambdaHttpClientServiceCollectionExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/Extensions/LambdaHttpClientServiceCollectionExtensionsTests.cs @@ -1,7 +1,7 @@ -using AwsLambda.Host.Builder.Extensions; using Microsoft.Extensions.DependencyInjection; +using MinimalLambda.Builder.Extensions; -namespace AwsLambda.Host.UnitTests.Builder.Extensions; +namespace MinimalLambda.UnitTests.Builder.Extensions; [TestSubject(typeof(LambdaHttpClientServiceCollectionExtensions))] public class LambdaHttpClientServiceCollectionExtensionsTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/MiddlewareLambdaApplicationExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Builder/Extensions/MiddlewareLambdaApplicationExtensionsTests.cs similarity index 98% rename from tests/AwsLambda.Host.UnitTests/Builder/Extensions/MiddlewareLambdaApplicationExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Builder/Extensions/MiddlewareLambdaApplicationExtensionsTests.cs index 7c6c4c18..e010c594 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/MiddlewareLambdaApplicationExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/Extensions/MiddlewareLambdaApplicationExtensionsTests.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -namespace AwsLambda.Host.UnitTests.Application.Extensions; +namespace MinimalLambda.UnitTests.Application.Extensions; [TestSubject(typeof(MiddlewareLambdaApplicationExtensions))] public class MiddlewareLambdaApplicationExtensionsTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/SerializerServiceCollectionExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Builder/Extensions/SerializerServiceCollectionExtensionsTests.cs similarity index 97% rename from tests/AwsLambda.Host.UnitTests/Builder/Extensions/SerializerServiceCollectionExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Builder/Extensions/SerializerServiceCollectionExtensionsTests.cs index 9da04bd1..8b90545c 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/SerializerServiceCollectionExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/Extensions/SerializerServiceCollectionExtensionsTests.cs @@ -1,7 +1,7 @@ using System.Text.Json.Serialization; using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.UnitTests.Builder.Extensions; +namespace MinimalLambda.UnitTests.Builder.Extensions; [TestSubject(typeof(SerializerServiceCollectionExtensions))] public class SerializerServiceCollectionExtensionsTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/ServiceCollectionExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Builder/Extensions/ServiceCollectionExtensionsTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Builder/Extensions/ServiceCollectionExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Builder/Extensions/ServiceCollectionExtensionsTests.cs index 61d09d91..f38be37c 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/Extensions/ServiceCollectionExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/Extensions/ServiceCollectionExtensionsTests.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.UnitTests.Builder.Extensions; +namespace MinimalLambda.UnitTests.Builder.Extensions; [TestSubject(typeof(ServiceCollectionExtensions))] public class ServiceCollectionExtensionsTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/LambdaApplicationBuilderTests.cs b/tests/MinimalLambda.UnitTests/Builder/LambdaApplicationBuilderTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Builder/LambdaApplicationBuilderTests.cs rename to tests/MinimalLambda.UnitTests/Builder/LambdaApplicationBuilderTests.cs index 7befa351..d43642b6 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/LambdaApplicationBuilderTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/LambdaApplicationBuilderTests.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.UnitTests.Builder; +namespace MinimalLambda.UnitTests.Builder; [TestSubject(typeof(LambdaApplicationBuilder))] public class LambdaApplicationBuilderTests @@ -324,7 +324,7 @@ public void Build_ConfigureOnInitBuilderCallback_AppliesClearLambdaOutputFormatt var builder = LambdaApplication.CreateBuilder(); // Configure to enable ClearLambdaOutputFormatting via appsettings - builder.Configuration["AwsLambdaHost:ClearLambdaOutputFormatting"] = "true"; + builder.Configuration["LambdaHost:ClearLambdaOutputFormatting"] = "true"; var app = builder.Build(); diff --git a/tests/AwsLambda.Host.UnitTests/Builder/LambdaApplicationTests.cs b/tests/MinimalLambda.UnitTests/Builder/LambdaApplicationTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Builder/LambdaApplicationTests.cs rename to tests/MinimalLambda.UnitTests/Builder/LambdaApplicationTests.cs index 0b34e899..a020fc85 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/LambdaApplicationTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/LambdaApplicationTests.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -namespace AwsLambda.Host.UnitTests.Application; +namespace MinimalLambda.UnitTests.Application; [TestSubject(typeof(LambdaApplication))] public class LambdaApplicationTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/LambdaInvocationBuilderTests.cs b/tests/MinimalLambda.UnitTests/Builder/LambdaInvocationBuilderTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Builder/LambdaInvocationBuilderTests.cs rename to tests/MinimalLambda.UnitTests/Builder/LambdaInvocationBuilderTests.cs index 20686593..7b869b48 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/LambdaInvocationBuilderTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/LambdaInvocationBuilderTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Builder; +namespace MinimalLambda.UnitTests.Builder; [TestSubject(typeof(LambdaInvocationBuilder))] public class LambdaInvocationBuilderTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/LambdaOnInitBuilderTests.cs b/tests/MinimalLambda.UnitTests/Builder/LambdaOnInitBuilderTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Builder/LambdaOnInitBuilderTests.cs rename to tests/MinimalLambda.UnitTests/Builder/LambdaOnInitBuilderTests.cs index 384aafea..e2204422 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/LambdaOnInitBuilderTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/LambdaOnInitBuilderTests.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.UnitTests.Builder; +namespace MinimalLambda.UnitTests.Builder; [TestSubject(typeof(LambdaOnInitBuilder))] public class LambdaOnInitBuilderTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/LambdaOnShutdownBuilderTests.cs b/tests/MinimalLambda.UnitTests/Builder/LambdaOnShutdownBuilderTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Builder/LambdaOnShutdownBuilderTests.cs rename to tests/MinimalLambda.UnitTests/Builder/LambdaOnShutdownBuilderTests.cs index 7a7605c0..e3483509 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/LambdaOnShutdownBuilderTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/LambdaOnShutdownBuilderTests.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.UnitTests.Builder; +namespace MinimalLambda.UnitTests.Builder; [TestSubject(typeof(LambdaOnShutdownBuilder))] public class LambdaOnShutdownBuilderTests diff --git a/tests/AwsLambda.Host.UnitTests/Builder/OnInit/OutputFormattingLambdaApplicationExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Builder/OnInit/OutputFormattingLambdaApplicationExtensionsTests.cs similarity index 97% rename from tests/AwsLambda.Host.UnitTests/Builder/OnInit/OutputFormattingLambdaApplicationExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Builder/OnInit/OutputFormattingLambdaApplicationExtensionsTests.cs index 2dbcb2b2..b9cafb50 100644 --- a/tests/AwsLambda.Host.UnitTests/Builder/OnInit/OutputFormattingLambdaApplicationExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Builder/OnInit/OutputFormattingLambdaApplicationExtensionsTests.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -namespace AwsLambda.Host.UnitTests.Application.Extensions; +namespace MinimalLambda.UnitTests.Application.Extensions; [TestSubject(typeof(OutputFormattingLambdaApplicationExtensions))] public class OutputFormattingLambdaApplicationExtensionsTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Cancellation/DefaultLambdaCancellationFactoryTests.cs b/tests/MinimalLambda.UnitTests/Core/Cancellation/DefaultLambdaCancellationFactoryTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Cancellation/DefaultLambdaCancellationFactoryTests.cs rename to tests/MinimalLambda.UnitTests/Core/Cancellation/DefaultLambdaCancellationFactoryTests.cs index 12c38779..6167dbc2 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Cancellation/DefaultLambdaCancellationFactoryTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Cancellation/DefaultLambdaCancellationFactoryTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests; +namespace MinimalLambda.UnitTests; [TestSubject(typeof(DefaultLambdaCancellationFactory))] public class DefaultLambdaCancellationFactoryTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Context/DefaultLambdaHostContextTests.cs b/tests/MinimalLambda.UnitTests/Core/Context/DefaultLambdaHostContextTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Context/DefaultLambdaHostContextTests.cs rename to tests/MinimalLambda.UnitTests/Core/Context/DefaultLambdaHostContextTests.cs index 73ec0a3e..b3e5ae3f 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Context/DefaultLambdaHostContextTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Context/DefaultLambdaHostContextTests.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.UnitTests.Core.Context; +namespace MinimalLambda.UnitTests.Core.Context; [TestSubject(typeof(DefaultLambdaHostContext))] public class DefaultLambdaHostContextTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Context/LambdaHostContextAccessorTests.cs b/tests/MinimalLambda.UnitTests/Core/Context/LambdaHostContextAccessorTests.cs similarity index 98% rename from tests/AwsLambda.Host.UnitTests/Core/Context/LambdaHostContextAccessorTests.cs rename to tests/MinimalLambda.UnitTests/Core/Context/LambdaHostContextAccessorTests.cs index 41319d4f..c0849b4c 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Context/LambdaHostContextAccessorTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Context/LambdaHostContextAccessorTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Context; +namespace MinimalLambda.UnitTests.Core.Context; [TestSubject(typeof(LambdaHostContextAccessor))] public class LambdaHostContextAccessorTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Context/LambdaHostContextFactoryTests.cs b/tests/MinimalLambda.UnitTests/Core/Context/LambdaHostContextFactoryTests.cs similarity index 98% rename from tests/AwsLambda.Host.UnitTests/Core/Context/LambdaHostContextFactoryTests.cs rename to tests/MinimalLambda.UnitTests/Core/Context/LambdaHostContextFactoryTests.cs index 009bb927..70c65d37 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Context/LambdaHostContextFactoryTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Context/LambdaHostContextFactoryTests.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace AwsLambda.Host.UnitTests.Core.Context; +namespace MinimalLambda.UnitTests.Core.Context; [TestSubject(typeof(LambdaHostContextFactory))] public class LambdaHostContextFactoryTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultEventFeatureProviderTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/DefaultEventFeatureProviderTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Features/DefaultEventFeatureProviderTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/DefaultEventFeatureProviderTests.cs index 026fd868..b2d4f6eb 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultEventFeatureProviderTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/DefaultEventFeatureProviderTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(DefaultEventFeatureProvider<>))] public class DefaultEventFeatureProviderTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultEventFeatureTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/DefaultEventFeatureTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Features/DefaultEventFeatureTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/DefaultEventFeatureTests.cs index 3de217b0..69367c2e 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultEventFeatureTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/DefaultEventFeatureTests.cs @@ -1,6 +1,6 @@ using NSubstitute.ExceptionExtensions; -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(DefaultEventFeature<>))] public class DefaultEventFeatureTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultFeatureCollectionFactoryTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionFactoryTests.cs similarity index 96% rename from tests/AwsLambda.Host.UnitTests/Core/Features/DefaultFeatureCollectionFactoryTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionFactoryTests.cs index 496eaabc..254a7e38 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultFeatureCollectionFactoryTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionFactoryTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(DefaultFeatureCollectionFactory))] public class DefaultFeatureCollectionFactoryTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs index c17593b7..cf13b624 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/DefaultFeatureCollectionTests.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(DefaultFeatureCollection))] public class DefaultFeatureCollectionTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultResponseFeatureProviderTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/DefaultResponseFeatureProviderTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Features/DefaultResponseFeatureProviderTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/DefaultResponseFeatureProviderTests.cs index 446516e9..cbce49a1 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultResponseFeatureProviderTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/DefaultResponseFeatureProviderTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(DefaultResponseFeatureProvider<>))] public class DefaultResponseFeatureProviderTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultResponseFeatureTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/DefaultResponseFeatureTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Features/DefaultResponseFeatureTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/DefaultResponseFeatureTests.cs index 22299b80..b0d321c4 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/DefaultResponseFeatureTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/DefaultResponseFeatureTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(DefaultResponseFeature<>))] public class DefaultResponseFeatureTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/EventFeatureProviderFactoryTest.cs b/tests/MinimalLambda.UnitTests/Core/Features/EventFeatureProviderFactoryTest.cs similarity index 93% rename from tests/AwsLambda.Host.UnitTests/Core/Features/EventFeatureProviderFactoryTest.cs rename to tests/MinimalLambda.UnitTests/Core/Features/EventFeatureProviderFactoryTest.cs index 8ddd3b6e..632dc169 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/EventFeatureProviderFactoryTest.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/EventFeatureProviderFactoryTest.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(EventFeatureProviderFactory))] public class EventFeatureProviderFactoryTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/FeatureCollectionExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/FeatureCollectionExtensionsTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Features/FeatureCollectionExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/FeatureCollectionExtensionsTests.cs index c03eb2b3..74be92b1 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/FeatureCollectionExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/FeatureCollectionExtensionsTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(FeatureCollectionExtensions))] public class FeatureCollectionExtensionsTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/FeatureLambdaHostContextExtensionsTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/FeatureLambdaHostContextExtensionsTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Features/FeatureLambdaHostContextExtensionsTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/FeatureLambdaHostContextExtensionsTests.cs index 62ee5712..6a58b7df 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/FeatureLambdaHostContextExtensionsTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/FeatureLambdaHostContextExtensionsTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(FeatureLambdaHostContextExtensions))] public class FeatureLambdaHostContextExtensionsTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/InvocationDataFeatureFactoryTests.cs b/tests/MinimalLambda.UnitTests/Core/Features/InvocationDataFeatureFactoryTests.cs similarity index 97% rename from tests/AwsLambda.Host.UnitTests/Core/Features/InvocationDataFeatureFactoryTests.cs rename to tests/MinimalLambda.UnitTests/Core/Features/InvocationDataFeatureFactoryTests.cs index 81b8271c..7ff9a938 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/InvocationDataFeatureFactoryTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/InvocationDataFeatureFactoryTests.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(InvocationDataFeatureFactory))] public class InvocationDataFeatureFactoryTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Features/ResponseFeatureProviderFactoryTest.cs b/tests/MinimalLambda.UnitTests/Core/Features/ResponseFeatureProviderFactoryTest.cs similarity index 93% rename from tests/AwsLambda.Host.UnitTests/Core/Features/ResponseFeatureProviderFactoryTest.cs rename to tests/MinimalLambda.UnitTests/Core/Features/ResponseFeatureProviderFactoryTest.cs index ee375d57..387ca334 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Features/ResponseFeatureProviderFactoryTest.cs +++ b/tests/MinimalLambda.UnitTests/Core/Features/ResponseFeatureProviderFactoryTest.cs @@ -1,4 +1,4 @@ -namespace AwsLambda.Host.UnitTests.Core.Features; +namespace MinimalLambda.UnitTests.Core.Features; [TestSubject(typeof(ResponseFeatureProviderFactory))] public class ResponseFeatureProviderFactoryTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Options/HostOptionsPostConfigurationTests.cs b/tests/MinimalLambda.UnitTests/Core/Options/HostOptionsPostConfigurationTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Options/HostOptionsPostConfigurationTests.cs rename to tests/MinimalLambda.UnitTests/Core/Options/HostOptionsPostConfigurationTests.cs index 6a896946..beeb31cd 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Options/HostOptionsPostConfigurationTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Options/HostOptionsPostConfigurationTests.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; -namespace AwsLambda.Host.UnitTests.Core.Options; +namespace MinimalLambda.UnitTests.Core.Options; [TestSubject(typeof(HostOptionsPostConfiguration))] public class HostOptionsPostConfigurationTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaBootstrapAdapterTests.cs b/tests/MinimalLambda.UnitTests/Core/Runtime/LambdaBootstrapAdapterTests.cs similarity index 93% rename from tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaBootstrapAdapterTests.cs rename to tests/MinimalLambda.UnitTests/Core/Runtime/LambdaBootstrapAdapterTests.cs index d7250f53..bef2c65b 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaBootstrapAdapterTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Runtime/LambdaBootstrapAdapterTests.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Options; -namespace AwsLambda.Host.UnitTests.Core.Runtime; +namespace MinimalLambda.UnitTests.Core.Runtime; [TestSubject(typeof(LambdaBootstrapAdapter))] public class LambdaBootstrapAdapterTest diff --git a/tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaHandlerComposerTests.cs b/tests/MinimalLambda.UnitTests/Core/Runtime/LambdaHandlerComposerTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaHandlerComposerTests.cs rename to tests/MinimalLambda.UnitTests/Core/Runtime/LambdaHandlerComposerTests.cs index 462de6be..5f6af7d9 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaHandlerComposerTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Runtime/LambdaHandlerComposerTests.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Options; -namespace AwsLambda.Host.UnitTests.Core.Runtime; +namespace MinimalLambda.UnitTests.Core.Runtime; [TestSubject(typeof(LambdaHandlerComposer))] public class LambdaHandlerComposerTests diff --git a/tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaHostedServiceTests.cs b/tests/MinimalLambda.UnitTests/Core/Runtime/LambdaHostedServiceTests.cs similarity index 99% rename from tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaHostedServiceTests.cs rename to tests/MinimalLambda.UnitTests/Core/Runtime/LambdaHostedServiceTests.cs index 6d97460c..9e4110b2 100644 --- a/tests/AwsLambda.Host.UnitTests/Core/Runtime/LambdaHostedServiceTests.cs +++ b/tests/MinimalLambda.UnitTests/Core/Runtime/LambdaHostedServiceTests.cs @@ -1,7 +1,7 @@ using System.Reflection; using Microsoft.Extensions.Hosting; -namespace AwsLambda.Host.UnitTests.Core.Runtime; +namespace MinimalLambda.UnitTests.Core.Runtime; [TestSubject(typeof(LambdaHostedService))] public class LambdaHostedServiceTests diff --git a/tests/AwsLambda.Host.UnitTests/GlobalUsings.cs b/tests/MinimalLambda.UnitTests/GlobalUsings.cs similarity index 58% rename from tests/AwsLambda.Host.UnitTests/GlobalUsings.cs rename to tests/MinimalLambda.UnitTests/GlobalUsings.cs index 6b42d1da..e413bfc8 100644 --- a/tests/AwsLambda.Host.UnitTests/GlobalUsings.cs +++ b/tests/MinimalLambda.UnitTests/GlobalUsings.cs @@ -2,10 +2,10 @@ global using AutoFixture; global using AutoFixture.Xunit3; global using AwesomeAssertions; -global using AwsLambda.Host.Builder; -global using AwsLambda.Host.Core; -global using AwsLambda.Host.Options; -global using AwsLambda.Host.Runtime; global using JetBrains.Annotations; +global using MinimalLambda; +global using MinimalLambda.Builder; +global using MinimalLambda.Options; +global using MinimalLambda.Runtime; global using NSubstitute; global using Xunit; diff --git a/tests/AwsLambda.Host.UnitTests/AwsLambda.Host.UnitTests.csproj b/tests/MinimalLambda.UnitTests/MinimalLambda.UnitTests.csproj similarity index 94% rename from tests/AwsLambda.Host.UnitTests/AwsLambda.Host.UnitTests.csproj rename to tests/MinimalLambda.UnitTests/MinimalLambda.UnitTests.csproj index 9040ed02..caf6b611 100644 --- a/tests/AwsLambda.Host.UnitTests/AwsLambda.Host.UnitTests.csproj +++ b/tests/MinimalLambda.UnitTests/MinimalLambda.UnitTests.csproj @@ -30,6 +30,6 @@ - + diff --git a/uv.lock b/uv.lock index 864f300b..44f17a6e 100644 --- a/uv.lock +++ b/uv.lock @@ -3,7 +3,7 @@ revision = 3 requires-python = ">=3.13" [[package]] -name = "aws-lambda-host-docs" +name = "minimal-lambda-docs" version = "0.1.0" source = { virtual = "." } dependencies = [