Skip to content

Commit

Permalink
Update nuget packages. (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanoSlivka authored Jul 9, 2021
1 parent 8d4b2cd commit a802dde
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 278 deletions.
14 changes: 13 additions & 1 deletion src/Data/MsAccessIdGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Kros.Data.MsAccess
/// <example>
/// <code language="cs" source="..\..\Documentation\Examples\Kros.Utils\IdGeneratorExamples.cs" region="IdGeneratorFactory"/>
/// </example>
public class MsAccessIdGenerator : IdGeneratorBase
public class MsAccessIdGenerator : DbNumericIdGeneratorBase<int>
{
/// <summary>
/// Creates a generator for table <paramref name="tableName"/> in database <paramref name="connectionString"/>
Expand Down Expand Up @@ -104,6 +104,18 @@ public override void InitDatabaseForIdGenerator()
}
}

/// <inheritdoc/>
public override string BackendDataType => "int";

/// <inheritdoc/>
public override string BackendTableName => "IdStore";

/// <inheritdoc/>
public override string BackendStoredProcedureName => "spGetNewId";

/// <inheritdoc/>
protected override int AddValue(int baseValue, int increment) => baseValue + increment;

#region Private helpers

private bool GetNewIDMsAccessCore(
Expand Down
4 changes: 3 additions & 1 deletion src/Data/MsAccessIdGeneratorFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public IIdGenerator GetGenerator(string tableName, int batchSize) =>
/// Registers factory methods for creating an instance of factory into <see cref="IdGeneratorFactories"/>.
/// </summary>
public static void Register() =>
IdGeneratorFactories.Register<OleDbConnection>(MsAccessDataHelper.ClientId,
IdGeneratorFactories.Register<OleDbConnection>(
typeof(int),
MsAccessDataHelper.ClientId,
(conn) => new MsAccessIdGeneratorFactory(conn as OleDbConnection),
(connString) => new MsAccessIdGeneratorFactory(connString));
}
Expand Down
46 changes: 5 additions & 41 deletions src/Kros.Utils.MsAccess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,46 +38,13 @@
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="Kros.Utils, Version=1.11.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Kros.Utils.1.11.0\lib\net46\Kros.Utils.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Data.SqlClient, Version=1.10.19324.4, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Data.SqlClient.1.1.0\lib\net46\Microsoft.Data.SqlClient.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Identity.Client, Version=3.0.8.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Identity.Client.3.0.8\lib\net45\Microsoft.Identity.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.5.5.0\lib\net451\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Logging, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Logging.5.5.0\lib\net451\Microsoft.IdentityModel.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Protocols, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Protocols.5.5.0\lib\net451\Microsoft.IdentityModel.Protocols.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.5.5.0\lib\net451\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.5.5.0\lib\net451\Microsoft.IdentityModel.Tokens.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Data.Common, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.Common.4.3.0\lib\net451\System.Data.Common.dll</HintPath>
</Reference>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Drawing" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.5.5.0\lib\net451\System.IdentityModel.Tokens.Jwt.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
Expand Down Expand Up @@ -120,14 +87,11 @@
</ItemGroup>
<ItemGroup>
<None Include="Kros.Utils.MsAccess.nuspec" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Kros.Utils">
<Version>1.18.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<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')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<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>
</PropertyGroup>
<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'))" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.0.0")]
[assembly: AssemblyFileVersion("1.8.0.0")]
[assembly: AssemblyVersion("1.9.0.0")]
[assembly: AssemblyFileVersion("1.9.0.0")]
15 changes: 0 additions & 15 deletions src/packages.config

This file was deleted.

Loading

0 comments on commit a802dde

Please sign in to comment.