Skip to content

Commit 2e0720b

Browse files
author
Bart Koelman
committed
**TEMP** Squashed commits from #1095
1 parent 4a2abe9 commit 2e0720b

File tree

708 files changed

+9778
-6720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

708 files changed

+9778
-6720
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2021.1.4",
6+
"version": "2021.2.2",
77
"commands": [
88
"jb"
99
]

Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function CheckLastExitCode {
88

99
function RunInspectCode {
1010
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
11-
dotnet jb inspectcode JsonApiDotNetCore.sln --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=SolutionPersonal -dsl=ProjectPersonal
11+
dotnet jb inspectcode JsonApiDotNetCore.sln --no-build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=SolutionPersonal -dsl=ProjectPersonal
1212
CheckLastExitCode
1313

1414
[xml]$xml = Get-Content "$outputPath"

CSharpGuidelinesAnalyzer.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<cSharpGuidelinesAnalyzerSettings>
33
<setting rule="AV1561" name="MaxParameterCount" value="6" />
4-
<setting rule="AV1561" name="MaxConstructorParameterCount" value="12" />
4+
<setting rule="AV1561" name="MaxConstructorParameterCount" value="13" />
55
</cSharpGuidelinesAnalyzerSettings>

Directory.Build.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
<NpgsqlPostgreSQLVersion>5.0.*</NpgsqlPostgreSQLVersion>
77
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
88
<WarningLevel>9999</WarningLevel>
9+
<Nullable>enable</Nullable>
910
</PropertyGroup>
1011

1112
<ItemGroup>
12-
<PackageReference Include="JetBrains.Annotations" Version="2021.1.0" PrivateAssets="All" />
13+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
1314
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.7.0" PrivateAssets="All" />
1415
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
1516
</ItemGroup>
@@ -24,9 +25,9 @@
2425
<PropertyGroup>
2526
<BogusVersion>33.1.1</BogusVersion>
2627
<CoverletVersion>3.1.0</CoverletVersion>
27-
<FluentAssertionsVersion>6.1.0</FluentAssertionsVersion>
28+
<FluentAssertionsVersion>6.2.0</FluentAssertionsVersion>
2829
<MoqVersion>4.16.1</MoqVersion>
2930
<XUnitVersion>2.4.*</XUnitVersion>
30-
<TestSdkVersion>16.11.0</TestSdkVersion>
31+
<TestSdkVersion>17.0.0</TestSdkVersion>
3132
</PropertyGroup>
3233
</Project>

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The need for breaking changes has blocked several efforts in the v4.x release, s
2121
- [x] Optimized delete to-many [#1030](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1030)
2222
- [x] Support System.Text.Json [#664](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/664) [#999](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/999) [1077](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1077) [1078](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1078)
2323
- [x] Optimize IIdentifiable to ResourceObject conversion [#1028](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1028) [#1024](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1024) [#233](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/233)
24-
- [ ] Nullable reference types [#1029](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1029)
24+
- [x] Nullable reference types [#1029](https://github.com/json-api-dotnet/JsonApiDotNetCore/issues/1029)
2525

2626
Aside from the list above, we have interest in the following topics. It's too soon yet to decide whether they'll make it into v5.x or in a later major version.
2727

benchmarks/BenchmarkResource.cs

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

benchmarks/BenchmarkResourcePublicNames.cs

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

benchmarks/Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</ItemGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="BenchmarkDotNet" Version="0.13.0" />
12+
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
1313
<PackageReference Include="Moq" Version="$(MoqVersion)" />
1414
</ItemGroup>
1515
</Project>

benchmarks/DependencyFactory.cs

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

benchmarks/Deserialization/DeserializationBenchmarkBase.cs

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public abstract class DeserializationBenchmarkBase
2121
protected DeserializationBenchmarkBase()
2222
{
2323
var options = new JsonApiOptions();
24-
IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add<ResourceA>().Build();
24+
IResourceGraph resourceGraph = new ResourceGraphBuilder(options, NullLoggerFactory.Instance).Add<IncomingResource>().Build();
2525
options.SerializerOptions.Converters.Add(new ResourceObjectConverter(resourceGraph));
2626
SerializerReadOptions = ((IJsonApiOptions)options).SerializerReadOptions;
2727

@@ -30,7 +30,9 @@ protected DeserializationBenchmarkBase()
3030
var resourceDefinitionAccessor = new ResourceDefinitionAccessor(resourceGraph, serviceContainer);
3131

3232
serviceContainer.AddService(typeof(IResourceDefinitionAccessor), resourceDefinitionAccessor);
33-
serviceContainer.AddService(typeof(IResourceDefinition<ResourceA, int>), new JsonApiResourceDefinition<ResourceA, int>(resourceGraph));
33+
34+
serviceContainer.AddService(typeof(IResourceDefinition<IncomingResource, int>),
35+
new JsonApiResourceDefinition<IncomingResource, int>(resourceGraph));
3436

3537
// ReSharper disable once VirtualMemberCallInConstructor
3638
JsonApiRequest request = CreateJsonApiRequest(resourceGraph);
@@ -56,7 +58,7 @@ protected DeserializationBenchmarkBase()
5658
protected abstract JsonApiRequest CreateJsonApiRequest(IResourceGraph resourceGraph);
5759

5860
[UsedImplicitly(ImplicitUseTargetFlags.Members)]
59-
public sealed class ResourceA : Identifiable<int>
61+
public sealed class IncomingResource : Identifiable<int>
6062
{
6163
[Attr]
6264
public bool Attribute01 { get; set; }
@@ -74,7 +76,7 @@ public sealed class ResourceA : Identifiable<int>
7476
public float? Attribute05 { get; set; }
7577

7678
[Attr]
77-
public string Attribute06 { get; set; }
79+
public string Attribute06 { get; set; } = null!;
7880

7981
[Attr]
8082
public DateTime? Attribute07 { get; set; }
@@ -89,34 +91,34 @@ public sealed class ResourceA : Identifiable<int>
8991
public DayOfWeek Attribute10 { get; set; }
9092

9193
[HasOne]
92-
public ResourceA Single1 { get; set; }
94+
public IncomingResource Single1 { get; set; } = null!;
9395

9496
[HasOne]
95-
public ResourceA Single2 { get; set; }
97+
public IncomingResource Single2 { get; set; } = null!;
9698

9799
[HasOne]
98-
public ResourceA Single3 { get; set; }
100+
public IncomingResource Single3 { get; set; } = null!;
99101

100102
[HasOne]
101-
public ResourceA Single4 { get; set; }
103+
public IncomingResource Single4 { get; set; } = null!;
102104

103105
[HasOne]
104-
public ResourceA Single5 { get; set; }
106+
public IncomingResource Single5 { get; set; } = null!;
105107

106108
[HasMany]
107-
public ISet<ResourceA> Multi1 { get; set; }
109+
public ISet<IncomingResource> Multi1 { get; set; } = null!;
108110

109111
[HasMany]
110-
public ISet<ResourceA> Multi2 { get; set; }
112+
public ISet<IncomingResource> Multi2 { get; set; } = null!;
111113

112114
[HasMany]
113-
public ISet<ResourceA> Multi3 { get; set; }
115+
public ISet<IncomingResource> Multi3 { get; set; } = null!;
114116

115117
[HasMany]
116-
public ISet<ResourceA> Multi4 { get; set; }
118+
public ISet<IncomingResource> Multi4 { get; set; } = null!;
117119

118120
[HasMany]
119-
public ISet<ResourceA> Multi5 { get; set; }
121+
public ISet<IncomingResource> Multi5 { get; set; } = null!;
120122
}
121123
}
122124
}

0 commit comments

Comments
 (0)