Skip to content

Commit febce00

Browse files
committed
- Package updates.
1 parent ab11262 commit febce00

File tree

10 files changed

+26
-25
lines changed

10 files changed

+26
-25
lines changed

SQLHelper.SpeedTests/SQLHelper.SpeedTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFrameworks>net5.0;net6.0;netcoreapp3.1</TargetFrameworks>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
11-
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.1" />
11+
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.5" />
1212
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
1313
<PackageReference Include="ZString" Version="2.4.4" />
1414
</ItemGroup>

SQLHelper.SpeedTests/Tests/AltImplementations/HelperClasses/BaseClasses/ParameterBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ protected ParameterBase(string id, DbType type, object? value = null, ParameterD
148148
public static bool operator ==(ParameterBase<TDataType> first, ParameterBase<TDataType> second)
149149
{
150150
return ReferenceEquals(first, second)
151-
|| (first is not null
152-
&& second is not null
151+
|| (!(first is null)
152+
&& !(second is null)
153153
&& first.GetHashCode() == second.GetHashCode());
154154
}
155155

SQLHelper.SpeedTests/Tests/AltImplementations/HelperClasses/Batch.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public Batch(IConnection source)
7070
/// <summary>
7171
/// Used to parse SQL commands to find parameters (when batching)
7272
/// </summary>
73-
private static readonly Regex ParameterRegex = new(@"[^@](?<ParamStart>[:@?])(?<ParamName>\w+)", RegexOptions.Compiled);
73+
private static readonly Regex ParameterRegex = new Regex(@"[^@](?<ParamStart>[:@?])(?<ParamName>\w+)", RegexOptions.Compiled);
7474

7575
/// <summary>
7676
/// Adds a command to be batched
@@ -101,7 +101,7 @@ public IBatch AddQuery<TCallbackData>(Action<ICommand, List<dynamic>, TCallbackD
101101
/// <returns>This</returns>
102102
public IBatch AddQuery(IBatch batch)
103103
{
104-
if (batch is not Batch TempValue)
104+
if (!(batch is Batch TempValue))
105105
return this;
106106
Commands.Add(TempValue.Commands);
107107
Headers.Add(TempValue.Headers);
@@ -366,7 +366,7 @@ private void SetupParameters(ref int Count, List<IParameter> FinalParameters, re
366366
ParameterRegex.Replace(Command.SQLCommand, x =>
367367
{
368368
var Param = Array.Find(Command.Parameters, z => z.ID == x.Groups["ParamName"].Value);
369-
return Param is not null ? x.Value + Suffix : x.Value;
369+
return !(Param is null) ? x.Value + Suffix : x.Value;
370370
}) + Environment.NewLine;
371371

372372
for (int i = 0, CommandParametersLength = Command.Parameters.Length; i < CommandParametersLength; i++)

SQLHelper.SpeedTests/Tests/AltImplementations/HelperClasses/Command.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public Command(Action<ICommand, List<dynamic>, TCallbackData> callBack, TCallbac
138138
/// <summary>
139139
/// The simple select regex
140140
/// </summary>
141-
private static readonly Regex SimpleSelectRegex = new(@"^SELECT\s|\sSELECT\s", RegexOptions.IgnoreCase | RegexOptions.Compiled);
141+
private static readonly Regex SimpleSelectRegex = new Regex(@"^SELECT\s|\sSELECT\s", RegexOptions.IgnoreCase | RegexOptions.Compiled);
142142

143143
/// <summary>
144144
/// Determines if the objects are equal
@@ -147,7 +147,7 @@ public Command(Action<ICommand, List<dynamic>, TCallbackData> callBack, TCallbac
147147
/// <returns>Determines if the commands are equal</returns>
148148
public override bool Equals(object? obj)
149149
{
150-
if (obj is not Command<TCallbackData> OtherCommand)
150+
if (!(obj is Command<TCallbackData> OtherCommand))
151151
return false;
152152

153153
if (OtherCommand.SQLCommand != SQLCommand

SQLHelper.SpeedTests/Tests/AltImplementations/HelperClasses/SelectFinder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public class SelectFinder : TSqlParserBaseListener
3939
public override void EnterDml_clause([NotNull] TSqlParser.Dml_clauseContext context)
4040
{
4141
var SelectStatement = context?.select_statement_standalone()?.select_statement();
42-
if (SelectStatement is not null)
42+
if (!(SelectStatement is null))
4343
{
44-
StatementFound |= SelectStatement.query_expression().query_specification() is not null;
44+
StatementFound |= !(SelectStatement.query_expression().query_specification() is null);
4545
}
4646
base.EnterDml_clause(context);
4747
}

SQLHelper.SpeedTests/Tests/AltImplementations/SQLHelper.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public SQLHelper AddQuery<TCallbackData>(Action<ICommand, List<dynamic>, TCallba
138138
/// <returns>This</returns>
139139
public SQLHelper AddQuery(SQLHelper helper)
140140
{
141-
if (helper is not null)
141+
if (!(helper is null))
142142
Batch.AddQuery(helper.Batch);
143143
return this;
144144
}
@@ -205,7 +205,7 @@ public async Task<TData> ExecuteScalarAsync<TData>(TData defaultValue = default)
205205
var BatchResults = await Batch.ExecuteAsync().ConfigureAwait(false);
206206
if (BatchResults.Count == 0 || BatchResults[0].Count == 0)
207207
return defaultValue;
208-
if (BatchResults[0][0] is not IDictionary<string, object> Value)
208+
if (!(BatchResults[0][0] is IDictionary<string, object> Value))
209209
return ((object)BatchResults[0][0]).To(defaultValue);
210210
return Value[Value.Keys.First()].To(defaultValue);
211211
}
@@ -232,7 +232,8 @@ public SQLHelper RemoveDuplicateCommands()
232232
/// <param name="___">Ignored</param>
233233
/// <param name="__">Ignored</param>
234234
/// <param name="_">Ignored</param>
235-
private static void DefaultAction(ICommand ___, List<dynamic> __, object _) { }
235+
private static void DefaultAction(ICommand ___, List<dynamic> __, object _)
236+
{ }
236237

237238
/// <summary>
238239
/// Sets the connection.

TestApp/TestApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFrameworks>net5.0;net6.0;netcoreapp3.1</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>

src/SQLHelper.DB/SQLHelper.DB.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Description>SQLHelper is a simple class to help with databases.</Description>
1111
<AssemblyTitle>SQLHelper DB</AssemblyTitle>
1212
<Authors>James Craig</Authors>
13-
<TargetFramework>netstandard2.1</TargetFramework>
13+
<TargetFrameworks>netstandard2.1;net5.0;net6.0</TargetFrameworks>
1414
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1515
<AssemblyName>SQLHelper.DB</AssemblyName>
1616
<PackageId>SQLHelper.DB</PackageId>
@@ -35,13 +35,13 @@
3535
<PrivateAssets>all</PrivateAssets>
3636
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3737
</PackageReference>
38-
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.1" />
39-
<PackageReference Include="SQLParser" Version="3.0.0" />
38+
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.5" />
39+
<PackageReference Include="SQLParser" Version="3.0.3" />
4040
<PackageReference Include="System.Data.Common" Version="4.3.0" />
4141
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
4242
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
43-
<PackageReference Include="BigBook" Version="4.0.16" />
44-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
43+
<PackageReference Include="BigBook" Version="4.0.18" />
44+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
4545
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
4646
</ItemGroup>
4747
</Project>

test/SQLHelper.Tests/ExtensionMethods/DbCommandExtensionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace SQLHelperDB.Tests.ExtensionMethods
88
{
99
public class DbCommandExtensionTests
1010
{
11-
public static readonly TheoryData<object> ParameterTypes = new()
11+
public static readonly TheoryData<object> ParameterTypes = new TheoryData<object>()
1212
{
1313
{ (sbyte)123 },
1414
{ (byte)123 },

test/SQLHelper.Tests/SQLHelper.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Description>Tests for SQLHelper</Description>
55
<AssemblyTitle>SQLHelper.Tests</AssemblyTitle>
66
<Authors>James Craig</Authors>
7-
<TargetFramework>net5.0</TargetFramework>
7+
<TargetFrameworks>net5.0;net6.0;netcoreapp3.1</TargetFrameworks>
88
<DebugType>portable</DebugType>
99
<AssemblyName>SQLHelper.Tests</AssemblyName>
1010
<PackageId>SQLHelper.Tests</PackageId>
@@ -27,13 +27,13 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
31-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
30+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
31+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
3232
<PrivateAssets>all</PrivateAssets>
3333
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
3434
</PackageReference>
3535
<PackageReference Include="xunit" Version="2.4.1" />
36-
<PackageReference Include="FileCurator" Version="3.1.41" />
36+
<PackageReference Include="FileCurator" Version="3.1.44" />
3737
</ItemGroup>
3838

3939
<ItemGroup>

0 commit comments

Comments
 (0)