Skip to content

Commit 620f8cd

Browse files
committed
commit 1
1 parent a7b44f7 commit 620f8cd

30 files changed

+113
-1608
lines changed

Libraries/Amazon.Lambda.Annotations.slnf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"solution": {
33
"path": "Libraries.sln",
44
"projects": [
5-
"src\\Amazon.Lambda.APIGatewayEvents\\Amazon.Lambda.APIGatewayEvents.csproj",
5+
"src\\Amazon.Lambda.Annotations.Models\\Amazon.Lambda.Annotations.Models.csproj",
66
"src\\Amazon.Lambda.Annotations.SourceGenerator\\Amazon.Lambda.Annotations.SourceGenerator.csproj",
7-
"src\\Amazon.Lambda.Annotations\\Amazon.Lambda.Annotations.csproj",
7+
"src\\Amazon.Lambda.APIGatewayEvents\\Amazon.Lambda.APIGatewayEvents.csproj",
88
"src\\Amazon.Lambda.Core\\Amazon.Lambda.Core.csproj",
99
"src\\Amazon.Lambda.RuntimeSupport\\Amazon.Lambda.RuntimeSupport.csproj",
10-
"src\\Amazon.Lambda.SQSEvents\\Amazon.Lambda.SQSEvents.csproj",
1110
"src\\Amazon.Lambda.Serialization.SystemTextJson\\Amazon.Lambda.Serialization.SystemTextJson.csproj",
11+
"src\\Amazon.Lambda.SQSEvents\\Amazon.Lambda.SQSEvents.csproj",
1212
"test\\Amazon.Lambda.Annotations.SourceGenerators.Tests\\Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj",
1313
"test\\TestExecutableServerlessApp\\TestExecutableServerlessApp.csproj",
1414
"test\\TestServerlessApp.IntegrationTests\\TestServerlessApp.IntegrationTests.csproj",

Libraries/Libraries.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestServerlessApp", "test\T
108108
EndProject
109109
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations.SourceGenerators.Tests", "test\Amazon.Lambda.Annotations.SourceGenerators.Tests\Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj", "{D76F2C74-3D7F-4DB3-BA1A-F2EA14749253}"
110110
EndProject
111-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations", "src\Amazon.Lambda.Annotations\Amazon.Lambda.Annotations.csproj", "{ADA9AF37-A8C1-47E6-BBBD-5C7E49C26C0E}"
111+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations.Models", "src\Amazon.Lambda.Annotations.Models\Amazon.Lambda.Annotations.Models.csproj", "{ADA9AF37-A8C1-47E6-BBBD-5C7E49C26C0E}"
112112
EndProject
113113
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.Lambda.Annotations.SourceGenerator", "src\Amazon.Lambda.Annotations.SourceGenerator\Amazon.Lambda.Annotations.SourceGenerator.csproj", "{3C617909-D61F-4AA8-B11C-4C9ECC865D75}"
114114
EndProject

Libraries/src/Amazon.Lambda.Annotations/Amazon.Lambda.Annotations.csproj renamed to Libraries/src/Amazon.Lambda.Annotations.Models/Amazon.Lambda.Annotations.Models.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<AssemblyVersion>1.5.2</AssemblyVersion>
4+
<Version>1.5.2</Version>
55
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77

88
<!--This assembly contains some internal methods that need to be accessed by the Amazon.Lambda.Annotations.SourceGenerator assembly.
99
Both these assemblies need to be strongly signed for the InternalsVisibleTo attribute to take effect.-->
1010
<AssemblyOriginatorKeyFile>..\..\..\buildtools\public.snk</AssemblyOriginatorKeyFile>
1111
<SignAssembly>true</SignAssembly>
12+
<RootNamespace>Amazon.Lambda.Annotations</RootNamespace>
1213
</PropertyGroup>
1314

1415
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Amazon.Lambda.Annotations.SourceGenerator.csproj

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<AssemblyVersion>1.5.2</AssemblyVersion>
5-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<Version>1.5.2</Version>
5+
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
66

77
<!--This assembly needs to access internal methods inside the Amazon.Lambda.Annotations assembly.
88
Both these assemblies need to be strongly signed for the InternalsVisibleTo attribute to take effect.-->
@@ -11,16 +11,35 @@
1111

1212
<!-- This is required to allow copying all the dependencies to bin directory which can be copied after to nuget package based on nuspec -->
1313
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
14+
15+
<IncludeBuildOutput>false</IncludeBuildOutput>
16+
<PackageId>Amazon.Lambda.Annotations</PackageId>
1417
</PropertyGroup>
1518

1619
<ItemGroup>
17-
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" />
18-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
19-
<PackageReference Include="System.CodeDom" Version="6.0.0" />
20+
<None Include="$(OutputPath)\netstandard2.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
21+
<None Include="$(OutputPath)\netstandard2.0\Amazon.Lambda.Annotations.Models.xml" Pack="true" PackagePath="lib/netstandard2.0" Visible="false" />
22+
<None Include="$(OutputPath)\net6.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="lib/net6.0" Visible="false" />
23+
<None Include="$(OutputPath)\net6.0\Amazon.Lambda.Annotations.Models.xml" Pack="true" PackagePath="lib/net6.0" Visible="false" />
24+
<None Include="$(OutputPath)\net8.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="lib/net8.0" Visible="false" />
25+
<None Include="$(OutputPath)\net8.0\Amazon.Lambda.Annotations.Models.xml" Pack="true" PackagePath="lib/net8.0" Visible="false" />
26+
27+
<None Include="$(OutputPath)\netstandard2.0\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
28+
<None Include="$(OutputPath)\netstandard2.0\Amazon.Lambda.Annotations.Models.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
29+
<!-- <None Include="$(OutputPath)\netstandard2.0\Amazon.Lambda.Core.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />-->
30+
<None Include="$(OutputPath)\netstandard2.0\Newtonsoft.Json.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
31+
<None Include="$(OutputPath)\netstandard2.0\YamlDotNet.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
32+
</ItemGroup>
33+
34+
<ItemGroup>
35+
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" PrivateAssets="all" />
36+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" />
37+
<PackageReference Include="System.CodeDom" Version="6.0.0" PrivateAssets="all" />
2038
</ItemGroup>
2139

2240
<ItemGroup>
2341
<!-- Generator dependencies, update Libraries/src/Amazon.Lambda.Annotations.nuspec whenever a new generator dependency is added. -->
42+
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
2443
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" GeneratePathProperty="true" PrivateAssets="all" />
2544
<PackageReference Include="YamlDotNet" Version="12.0.0" GeneratePathProperty="true" PrivateAssets="all" />
2645
</ItemGroup>
@@ -37,7 +56,9 @@
3756
</Target>
3857

3958
<ItemGroup>
40-
<ProjectReference Include="..\Amazon.Lambda.Annotations\Amazon.Lambda.Annotations.csproj" OutputItemType="Analyzer" />
59+
<ProjectReference Include="..\Amazon.Lambda.Annotations.Models\Amazon.Lambda.Annotations.Models.csproj" OutputItemType="Analyzer">
60+
<ExcludeAssets>All</ExcludeAssets>
61+
</ProjectReference>
4162
</ItemGroup>
4263

4364
<ItemGroup>

Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/LambdaFunctionModelBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private static LambdaFunctionModel Build(IMethodSymbol lambdaMethodSymbol, IMeth
3636
SerializerInfo = GetSerializerInfoAttribute(context, lambdaMethodSymbol),
3737
StartupType = configureMethodSymbol != null ? TypeModelBuilder.Build(configureMethodSymbol.ContainingType, context) : null,
3838
SourceGeneratorVersion = context.Compilation
39-
.ReferencedAssemblyNames.FirstOrDefault(x => string.Equals(x.Name, "Amazon.Lambda.Annotations"))
39+
.ReferencedAssemblyNames.FirstOrDefault(x => string.Equals(x.Name, "Amazon.Lambda.Annotations.Models"))
4040
?.Version.ToString(),
4141
IsExecutable = isExecutable,
4242
Runtime = runtime,

Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Amazon.Lambda.Annotations.SourceGenerators.Tests.csproj

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</PackageReference>
2424
<PackageReference Include="AWSSDK.Core" Version="3.7.103.24" />
2525
<PackageReference Include="xunit" Version="2.4.2" />
26+
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.1" />
2627
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.1" />
2728
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.1" />
2829
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing.XUnit" Version="1.1.1" />
@@ -32,6 +33,78 @@
3233
</ItemGroup>
3334

3435
<ItemGroup>
36+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\FromBodyAttribute.cs">
37+
<Link>Amazon.Lambda.Annotations\APIGateway\FromBodyAttribute.cs</Link>
38+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
39+
</Content>
40+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\FromHeaderAttribute.cs">
41+
<Link>Amazon.Lambda.Annotations\APIGateway\FromHeaderAttribute.cs</Link>
42+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
43+
</Content>
44+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\FromQueryAttribute.cs">
45+
<Link>Amazon.Lambda.Annotations\APIGateway\FromQueryAttribute.cs</Link>
46+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
47+
</Content>
48+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\FromRouteAttribute.cs">
49+
<Link>Amazon.Lambda.Annotations\APIGateway\FromRouteAttribute.cs</Link>
50+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
51+
</Content>
52+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\HttpApiAttribute.cs">
53+
<Link>Amazon.Lambda.Annotations\APIGateway\HttpApiAttribute.cs</Link>
54+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
55+
</Content>
56+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\HttpApiVersion.cs">
57+
<Link>Amazon.Lambda.Annotations\APIGateway\HttpApiVersion.cs</Link>
58+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
59+
</Content>
60+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\HttpResults.cs">
61+
<Link>Amazon.Lambda.Annotations\APIGateway\HttpResults.cs</Link>
62+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
63+
</Content>
64+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\LambdaHttpMethod.cs">
65+
<Link>Amazon.Lambda.Annotations\APIGateway\LambdaHttpMethod.cs</Link>
66+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
67+
</Content>
68+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\APIGateway\RestApiAttribute.cs">
69+
<Link>Amazon.Lambda.Annotations\APIGateway\RestApiAttribute.cs</Link>
70+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
71+
</Content>
72+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\FromServicesAttribute.cs">
73+
<Link>Amazon.Lambda.Annotations\FromServicesAttribute.cs</Link>
74+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
75+
</Content>
76+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\INamedAttribute.cs">
77+
<Link>Amazon.Lambda.Annotations\INamedAttribute.cs</Link>
78+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
79+
</Content>
80+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\LambdaFunctionAttribute.cs">
81+
<Link>Amazon.Lambda.Annotations\LambdaFunctionAttribute.cs</Link>
82+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
83+
</Content>
84+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\LambdaGlobalPropertiesAttribute.cs">
85+
<Link>Amazon.Lambda.Annotations\LambdaGlobalPropertiesAttribute.cs</Link>
86+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
87+
</Content>
88+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\LambdaPackageType.cs">
89+
<Link>Amazon.Lambda.Annotations\LambdaPackageType.cs</Link>
90+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
91+
</Content>
92+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\LambdaStartupAttribute.cs">
93+
<Link>Amazon.Lambda.Annotations\LambdaStartupAttribute.cs</Link>
94+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
95+
</Content>
96+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\README.md">
97+
<Link>Amazon.Lambda.Annotations\README.md</Link>
98+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
99+
</Content>
100+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\SQS\SQSEventAttribute.cs">
101+
<Link>Amazon.Lambda.Annotations\SQS\SQSEventAttribute.cs</Link>
102+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
103+
</Content>
104+
<Content Include="..\..\src\Amazon.Lambda.Annotations.Models\THIRD_PARTY_LICENSES">
105+
<Link>Amazon.Lambda.Annotations\THIRD_PARTY_LICENSES</Link>
106+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
107+
</Content>
35108
<Content Include="..\TestServerlessApp\**">
36109
<Link>TestServerlessApp\%(RecursiveDir)/%(FileName)%(Extension)</Link>
37110
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -175,7 +248,7 @@
175248

176249
<ItemGroup>
177250
<ProjectReference Include="..\..\src\Amazon.Lambda.Annotations.SourceGenerator\Amazon.Lambda.Annotations.SourceGenerator.csproj" />
178-
<ProjectReference Include="..\..\src\Amazon.Lambda.Annotations\Amazon.Lambda.Annotations.csproj" />
251+
<ProjectReference Include="..\..\src\Amazon.Lambda.Annotations.Models\Amazon.Lambda.Annotations.Models.csproj" />
179252
<ProjectReference Include="..\..\src\Amazon.Lambda.APIGatewayEvents\Amazon.Lambda.APIGatewayEvents.csproj" />
180253
<ProjectReference Include="..\..\src\Amazon.Lambda.SQSEvents\Amazon.Lambda.SQSEvents.csproj" />
181254
<!--

Libraries/test/TestExecutableServerlessApp/TestExecutableServerlessApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</ItemGroup>
2424
<ItemGroup>
2525
<ProjectReference Include="..\..\src\Amazon.Lambda.Annotations.SourceGenerator\Amazon.Lambda.Annotations.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
26-
<ProjectReference Include="..\..\src\Amazon.Lambda.Annotations\Amazon.Lambda.Annotations.csproj" />
26+
<ProjectReference Include="..\..\src\Amazon.Lambda.Annotations.Models\Amazon.Lambda.Annotations.Models.csproj" />
2727
<ProjectReference Include="..\..\src\Amazon.Lambda.APIGatewayEvents\Amazon.Lambda.APIGatewayEvents.csproj" />
2828
<ProjectReference Include="..\..\src\Amazon.Lambda.Core\Amazon.Lambda.Core.csproj" />
2929
<ProjectReference Include="..\..\src\Amazon.Lambda.RuntimeSupport\Amazon.Lambda.RuntimeSupport.csproj" />

0 commit comments

Comments
 (0)