Skip to content

Commit a802dde

Browse files
authored
Update nuget packages. (#6)
1 parent 8d4b2cd commit a802dde

File tree

8 files changed

+58
-278
lines changed

8 files changed

+58
-278
lines changed

src/Data/MsAccessIdGenerator.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Kros.Data.MsAccess
1717
/// <example>
1818
/// <code language="cs" source="..\..\Documentation\Examples\Kros.Utils\IdGeneratorExamples.cs" region="IdGeneratorFactory"/>
1919
/// </example>
20-
public class MsAccessIdGenerator : IdGeneratorBase
20+
public class MsAccessIdGenerator : DbNumericIdGeneratorBase<int>
2121
{
2222
/// <summary>
2323
/// Creates a generator for table <paramref name="tableName"/> in database <paramref name="connectionString"/>
@@ -104,6 +104,18 @@ public override void InitDatabaseForIdGenerator()
104104
}
105105
}
106106

107+
/// <inheritdoc/>
108+
public override string BackendDataType => "int";
109+
110+
/// <inheritdoc/>
111+
public override string BackendTableName => "IdStore";
112+
113+
/// <inheritdoc/>
114+
public override string BackendStoredProcedureName => "spGetNewId";
115+
116+
/// <inheritdoc/>
117+
protected override int AddValue(int baseValue, int increment) => baseValue + increment;
118+
107119
#region Private helpers
108120

109121
private bool GetNewIDMsAccessCore(

src/Data/MsAccessIdGeneratorFactory.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public IIdGenerator GetGenerator(string tableName, int batchSize) =>
5050
/// Registers factory methods for creating an instance of factory into <see cref="IdGeneratorFactories"/>.
5151
/// </summary>
5252
public static void Register() =>
53-
IdGeneratorFactories.Register<OleDbConnection>(MsAccessDataHelper.ClientId,
53+
IdGeneratorFactories.Register<OleDbConnection>(
54+
typeof(int),
55+
MsAccessDataHelper.ClientId,
5456
(conn) => new MsAccessIdGeneratorFactory(conn as OleDbConnection),
5557
(connString) => new MsAccessIdGeneratorFactory(connString));
5658
}

src/Kros.Utils.MsAccess.csproj

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -38,46 +38,13 @@
3838
<SignAssembly>false</SignAssembly>
3939
</PropertyGroup>
4040
<ItemGroup>
41-
<Reference Include="Kros.Utils, Version=1.11.0.0, Culture=neutral, processorArchitecture=MSIL">
42-
<HintPath>..\packages\Kros.Utils.1.11.0\lib\net46\Kros.Utils.dll</HintPath>
43-
</Reference>
44-
<Reference Include="Microsoft.Data.SqlClient, Version=1.10.19324.4, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5, processorArchitecture=MSIL">
45-
<HintPath>..\packages\Microsoft.Data.SqlClient.1.1.0\lib\net46\Microsoft.Data.SqlClient.dll</HintPath>
46-
</Reference>
47-
<Reference Include="Microsoft.Identity.Client, Version=3.0.8.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
48-
<HintPath>..\packages\Microsoft.Identity.Client.3.0.8\lib\net45\Microsoft.Identity.Client.dll</HintPath>
49-
</Reference>
50-
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51-
<HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.5.5.0\lib\net451\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
52-
</Reference>
53-
<Reference Include="Microsoft.IdentityModel.Logging, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
54-
<HintPath>..\packages\Microsoft.IdentityModel.Logging.5.5.0\lib\net451\Microsoft.IdentityModel.Logging.dll</HintPath>
55-
</Reference>
56-
<Reference Include="Microsoft.IdentityModel.Protocols, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
57-
<HintPath>..\packages\Microsoft.IdentityModel.Protocols.5.5.0\lib\net451\Microsoft.IdentityModel.Protocols.dll</HintPath>
58-
</Reference>
59-
<Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
60-
<HintPath>..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.5.5.0\lib\net451\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath>
61-
</Reference>
62-
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
63-
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.5.5.0\lib\net451\Microsoft.IdentityModel.Tokens.dll</HintPath>
64-
</Reference>
65-
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
66-
<HintPath>..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
67-
</Reference>
6841
<Reference Include="System" />
6942
<Reference Include="System.Core" />
7043
<Reference Include="Microsoft.CSharp" />
7144
<Reference Include="System.Data" />
72-
<Reference Include="System.Data.Common, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
73-
<HintPath>..\packages\System.Data.Common.4.3.0\lib\net451\System.Data.Common.dll</HintPath>
74-
</Reference>
7545
<Reference Include="System.Data.DataSetExtensions" />
7646
<Reference Include="System.Drawing" />
7747
<Reference Include="System.IdentityModel" />
78-
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79-
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.5.5.0\lib\net451\System.IdentityModel.Tokens.Jwt.dll</HintPath>
80-
</Reference>
8148
<Reference Include="System.Net.Http" />
8249
<Reference Include="System.Windows.Forms" />
8350
<Reference Include="System.Xml" />
@@ -120,14 +87,11 @@
12087
</ItemGroup>
12188
<ItemGroup>
12289
<None Include="Kros.Utils.MsAccess.nuspec" />
123-
<None Include="packages.config" />
90+
</ItemGroup>
91+
<ItemGroup>
92+
<PackageReference Include="Kros.Utils">
93+
<Version>1.18.0</Version>
94+
</PackageReference>
12495
</ItemGroup>
12596
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
126-
<Import Project="..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets" Condition="Exists('..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" />
127-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
128-
<PropertyGroup>
129-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
130-
</PropertyGroup>
131-
<Error Condition="!Exists('..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets'))" />
132-
</Target>
13397
</Project>

src/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.8.0.0")]
35-
[assembly: AssemblyFileVersion("1.8.0.0")]
34+
[assembly: AssemblyVersion("1.9.0.0")]
35+
[assembly: AssemblyFileVersion("1.9.0.0")]

src/packages.config

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)