From bab9f85424dd75a5ce8eba4d63a64f21da614a4d Mon Sep 17 00:00:00 2001 From: Marc Gravell Date: Sun, 12 Nov 2023 21:39:31 +0000 Subject: [PATCH] add vanilla Dapper comparison to linker usage --- Dapper.AOT.sln | 7 +++++++ test/UsageLinker/Product.cs | 3 ++- test/UsageLinker/UsageLinker.csproj | 1 + test/UsageVanilla/UsageVanilla.csproj | 16 ++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 test/UsageVanilla/UsageVanilla.csproj diff --git a/Dapper.AOT.sln b/Dapper.AOT.sln index e1495534..15a5e283 100644 --- a/Dapper.AOT.sln +++ b/Dapper.AOT.sln @@ -38,6 +38,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dapper.Advisor", "src\Dappe EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docs", "docs\docs.csproj", "{C6527566-38F4-43CC-9E0E-91C4B8854774}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UsageVanilla", "test\UsageVanilla\UsageVanilla.csproj", "{840EA1CA-62FF-409E-89F5-CD3BB269BAE3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -72,6 +74,10 @@ Global {C6527566-38F4-43CC-9E0E-91C4B8854774}.Debug|Any CPU.Build.0 = Debug|Any CPU {C6527566-38F4-43CC-9E0E-91C4B8854774}.Release|Any CPU.ActiveCfg = Release|Any CPU {C6527566-38F4-43CC-9E0E-91C4B8854774}.Release|Any CPU.Build.0 = Release|Any CPU + {840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -84,6 +90,7 @@ Global {6753728F-5359-4CED-9A31-3345BCC8AC38} = {FE215D4B-811B-47BB-9F05-6382DD1C6729} {A77B633C-573E-43CD-85A4-8063B33143B4} = {FE215D4B-811B-47BB-9F05-6382DD1C6729} {C6527566-38F4-43CC-9E0E-91C4B8854774} = {1135D4FD-770E-41DF-920B-A8F75E42A832} + {840EA1CA-62FF-409E-89F5-CD3BB269BAE3} = {9A846B95-90CE-4335-9043-48C5B8EA4FB8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A89CDAFA-494F-4168-9648-1138BA738D43} diff --git a/test/UsageLinker/Product.cs b/test/UsageLinker/Product.cs index 953c1e45..3a7a11eb 100644 --- a/test/UsageLinker/Product.cs +++ b/test/UsageLinker/Product.cs @@ -3,8 +3,9 @@ using System.Data.Common; namespace UsageLinker; - +#if AOT [DapperAot(true)] +#endif public class Product { public static dynamic GetProductDynamic(DbConnection connection, int productId) => connection.QueryFirst( diff --git a/test/UsageLinker/UsageLinker.csproj b/test/UsageLinker/UsageLinker.csproj index 2cf0ab0b..f43948b7 100644 --- a/test/UsageLinker/UsageLinker.csproj +++ b/test/UsageLinker/UsageLinker.csproj @@ -7,6 +7,7 @@ true true $(InterceptorsPreviewNamespaces);Dapper.AOT + $(DefineConstants);AOT diff --git a/test/UsageVanilla/UsageVanilla.csproj b/test/UsageVanilla/UsageVanilla.csproj new file mode 100644 index 00000000..a6b3c74c --- /dev/null +++ b/test/UsageVanilla/UsageVanilla.csproj @@ -0,0 +1,16 @@ + + + Exe + net8.0 + False + true + + + + + + + + + +