Skip to content

Commit 3e7e20d

Browse files
Increase C# language version to 12.0 and refactor sources accordingly
1 parent 67b69ab commit 3e7e20d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Atata.Configuration.Json/Atata.Configuration.Json.csproj

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

33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0</TargetFrameworks>
5-
<LangVersion>11.0</LangVersion>
5+
<LangVersion>12.0</LangVersion>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Version>2.5.0</Version>
88
<Description>C#/.NET package for Atata configuration through JSON files.

src/Atata.Configuration.Json/JsonConfig`1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public DriverJsonSection Driver
5151
{
5252
if (value != null)
5353
{
54-
Drivers ??= new List<DriverJsonSection>();
54+
Drivers ??= [];
5555
Drivers.Add(value);
5656
}
5757
}

src/Atata.Configuration.Json/JsonSection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Atata.Configuration.Json;
88
public class JsonSection
99
{
1010
[JsonExtensionData]
11-
public Dictionary<string, JToken> AdditionalProperties { get; } = new Dictionary<string, JToken>();
11+
public Dictionary<string, JToken> AdditionalProperties { get; } = [];
1212

1313
[JsonIgnore]
1414
public Dictionary<string, object> ExtraPropertiesMap => AdditionalProperties?.ToDictionary(x => x.Key, x => ConvertJToken(x.Value));

src/Atata.Configuration.Json/Mapping/JsonConfigMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static AtataContextBuilder Map<TConfig>(TConfig config, AtataContextBuild
102102
if (config.UseNUnitTestSuiteType)
103103
builder.UseNUnitTestSuiteType();
104104

105-
List<string> warnings = new();
105+
List<string> warnings = [];
106106

107107
// TODO: v3. Remove all the code below related to NUnit event handlers.
108108
#pragma warning disable CS0618 // Type or member is obsolete

0 commit comments

Comments
 (0)