Skip to content

Commit

Permalink
fixup linker (libref)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell committed Nov 12, 2023
1 parent 39bd62c commit 973c9f0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageVersion Include="BenchmarkDotNet" Version="0.13.8" />
<PackageVersion Include="FastMember" Version="1.5.0" />
<PackageVersion Include="Dapper" Version="2.1.21" />
<PackageVersion Include="Dapper.AOT" Version="0.5.0-beta.125" />
<PackageVersion Include="Dapper.AOT" Version="0.5.0-beta.129" />
<PackageVersion Include="Dapper.StrongName" Version="2.1.21" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.133" />
Expand Down
8 changes: 7 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
@cls
@rd /S /Q "src/Dapper.AOT.Analyzers/bin/Release/" >NUL 2>NUL
@rd /S /Q "src/Dapper.AOT/bin/Release/" >NUL 2>NUL
@rd /S /Q "src/Dapper.Advisor/bin/Release/" >NUL 2>NUL

@dotnet clean src/Dapper.AOT.Analyzers
@dotnet clean src/Dapper.AOT
@dotnet clean src/Dapper.Advisor

@dotnet restore src/Dapper.AOT.Analyzers
@dotnet restore src/Dapper.AOT
@dotnet restore src/Dapper.Advisor

@dotnet build src/Dapper.AOT.Analyzers -c Release
@dotnet build src/Dapper.AOT -c Release
Expand All @@ -18,5 +22,7 @@

@echo .
@echo Deployment package is in: src/Dapper.AOT/bin/Release/
@echo and: src/Dapper.Advisor/bin/Release/
@echo .
@dir src\Dapper.AOT\bin\Release\*.nupkg /B
@dir src\Dapper.AOT\bin\Release\*.nupkg /B
@dir src\Dapper.Advisor\bin\Release\*.nupkg /B
Original file line number Diff line number Diff line change
Expand Up @@ -242,38 +242,38 @@ private RowFactory2() {}
}
public override global::Foo.SingleFactoryNotMarkedWithDapperAot Read(global::System.Data.Common.DbDataReader reader, global::System.ReadOnlySpan<int> tokens, int columnOffset, object? state)
{
int value0 = default;
string? value1 = default;
double? value2 = default;
global::Foo.SingleFactoryNotMarkedWithDapperAot result = new();
foreach (var token in tokens)
{
switch (token)
{
case 0:
value0 = reader.GetInt32(columnOffset);
result.X = reader.GetInt32(columnOffset);
break;
case 3:
value0 = GetValue<int>(reader, columnOffset);
result.X = GetValue<int>(reader, columnOffset);
break;
case 1:
value1 = reader.IsDBNull(columnOffset) ? (string?)null : reader.GetString(columnOffset);
result.Y = reader.IsDBNull(columnOffset) ? (string?)null : reader.GetString(columnOffset);
break;
case 4:
value1 = reader.IsDBNull(columnOffset) ? (string?)null : GetValue<string>(reader, columnOffset);
result.Y = reader.IsDBNull(columnOffset) ? (string?)null : GetValue<string>(reader, columnOffset);
break;
case 2:
value2 = reader.IsDBNull(columnOffset) ? (double?)null : reader.GetDouble(columnOffset);
result.Z = reader.IsDBNull(columnOffset) ? (double?)null : reader.GetDouble(columnOffset);
break;
case 5:
value2 = reader.IsDBNull(columnOffset) ? (double?)null : GetValue<double>(reader, columnOffset);
result.Z = reader.IsDBNull(columnOffset) ? (double?)null : GetValue<double>(reader, columnOffset);
break;

}
columnOffset++;

}
return global::Foo.SingleFactoryNotMarkedWithDapperAot.Construct(value0, value1, value2);
return result;

}

}

private sealed class RowFactory3 : global::Dapper.RowFactory<global::Foo.MultipleStandardFactoryMethods>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,38 +242,38 @@ private RowFactory2() {}
}
public override global::Foo.SingleFactoryNotMarkedWithDapperAot Read(global::System.Data.Common.DbDataReader reader, global::System.ReadOnlySpan<int> tokens, int columnOffset, object? state)
{
int value0 = default;
string? value1 = default;
double? value2 = default;
global::Foo.SingleFactoryNotMarkedWithDapperAot result = new();
foreach (var token in tokens)
{
switch (token)
{
case 0:
value0 = reader.GetInt32(columnOffset);
result.X = reader.GetInt32(columnOffset);
break;
case 3:
value0 = GetValue<int>(reader, columnOffset);
result.X = GetValue<int>(reader, columnOffset);
break;
case 1:
value1 = reader.IsDBNull(columnOffset) ? (string?)null : reader.GetString(columnOffset);
result.Y = reader.IsDBNull(columnOffset) ? (string?)null : reader.GetString(columnOffset);
break;
case 4:
value1 = reader.IsDBNull(columnOffset) ? (string?)null : GetValue<string>(reader, columnOffset);
result.Y = reader.IsDBNull(columnOffset) ? (string?)null : GetValue<string>(reader, columnOffset);
break;
case 2:
value2 = reader.IsDBNull(columnOffset) ? (double?)null : reader.GetDouble(columnOffset);
result.Z = reader.IsDBNull(columnOffset) ? (double?)null : reader.GetDouble(columnOffset);
break;
case 5:
value2 = reader.IsDBNull(columnOffset) ? (double?)null : GetValue<double>(reader, columnOffset);
result.Z = reader.IsDBNull(columnOffset) ? (double?)null : GetValue<double>(reader, columnOffset);
break;

}
columnOffset++;

}
return global::Foo.SingleFactoryNotMarkedWithDapperAot.Construct(value0, value1, value2);
return result;

}

}

private sealed class RowFactory3 : global::Dapper.RowFactory<global::Foo.MultipleStandardFactoryMethods>
Expand Down

0 comments on commit 973c9f0

Please sign in to comment.