Skip to content

Commit 68f2f26

Browse files
committed
Fixed path issues and C# version/target
1 parent ed9f4b9 commit 68f2f26

8 files changed

+22
-20
lines changed

src/AngleSharp.Diffing.Tests/Egil.AngleSharp.DiffingTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<ProjectReference Include="..\src\Egil.AngleSharp.Diffing.csproj" />
31+
<ProjectReference Include="..\AngleSharp.Diffing\Egil.AngleSharp.Diffing.csproj" />
3232
</ItemGroup>
3333

3434
</Project>

src/AngleSharp.Diffing/Core/AttributeComparison.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public AttributeComparison(in AttributeComparisonSource control, in AttributeCom
2020

2121
#region Equals and HashCode
2222
public bool Equals(AttributeComparison other) => Control.Equals(other.Control) && Test.Equals(other.Test);
23-
public override bool Equals(object obj) => obj is AttributeComparison other && Equals(other);
23+
public override bool Equals(object? obj) => obj is AttributeComparison other && Equals(other);
2424
public override int GetHashCode() => (Control, Test).GetHashCode();
2525
public static bool operator ==(AttributeComparison left, AttributeComparison right) => left.Equals(right);
2626
public static bool operator !=(AttributeComparison left, AttributeComparison right) => !left.Equals(right);

src/AngleSharp.Diffing/Core/AttributeComparisonSource.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public AttributeComparisonSource(string attributeName, in ComparisonSource eleme
3131
#region Equals and HashCode
3232
public bool Equals(AttributeComparisonSource other) => Object.ReferenceEquals(Attribute, other.Attribute) && Path.Equals(other.Path, StringComparison.Ordinal) && ElementSource.Equals(other.ElementSource) ;
3333
public override int GetHashCode() => (Attribute, ElementSource).GetHashCode();
34-
public override bool Equals(object obj) => obj is AttributeComparisonSource other && Equals(other);
34+
public override bool Equals(object? obj) => obj is AttributeComparisonSource other && Equals(other);
3535
public static bool operator ==(AttributeComparisonSource left, AttributeComparisonSource right) => left.Equals(right);
3636
public static bool operator !=(AttributeComparisonSource left, AttributeComparisonSource right) => !left.Equals(right);
3737
#endregion

src/AngleSharp.Diffing/Core/Comparison.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public bool TryGetNodesAsType<TNode>([NotNullWhen(true)]out TNode? controlNode,
4242

4343
#region Equals and HashCode
4444
public bool Equals(Comparison other) => Control.Equals(other.Control) && Test.Equals(other.Test);
45-
public override bool Equals(object obj) => obj is Comparison other && Equals(other);
45+
public override bool Equals(object? obj) => obj is Comparison other && Equals(other);
4646
public override int GetHashCode() => (Control, Test).GetHashCode();
4747
public static bool operator ==(Comparison left, Comparison right) => left.Equals(right);
4848
public static bool operator !=(Comparison left, Comparison right) => !left.Equals(right);

src/AngleSharp.Diffing/Core/ComparisonSource.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private static string CalculateNodePath(INode node, int index)
7070
#region Equals and HashCode
7171
public bool Equals(ComparisonSource other) => Object.ReferenceEquals(Node, other.Node) && Index == other.Index && Path.Equals(other.Path, StringComparison.Ordinal) && SourceType == other.SourceType;
7272
public override int GetHashCode() => _hashCode;
73-
public override bool Equals(object obj) => obj is ComparisonSource other && Equals(other);
73+
public override bool Equals(object? obj) => obj is ComparisonSource other && Equals(other);
7474
public static bool operator ==(ComparisonSource left, ComparisonSource right) => left.Equals(right);
7575
public static bool operator !=(ComparisonSource left, ComparisonSource right) => !left.Equals(right);
7676
#endregion

src/AngleSharp.Diffing/Egil.AngleSharp.Diffing.csproj

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
<TargetFramework>netstandard2.0</TargetFramework>
55
</PropertyGroup>
66

7+
<PropertyGroup>
8+
<AnnotatedReferenceAssemblyVersion>3.0.0</AnnotatedReferenceAssemblyVersion>
9+
</PropertyGroup>
10+
<ItemGroup>
11+
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.77" PrivateAssets="all" />
12+
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" />
13+
</ItemGroup>
14+
715
<ItemGroup>
816
<Compile Remove="Matchers\**" />
917
<EmbeddedResource Remove="Matchers\**" />

src/AngleSharp.Diffing/NotNullWhenAttribute.cs

-15
This file was deleted.

src/Directory.Build.props

+9
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,13 @@
44
<Product>AngleSharp.Diffing</Product>
55
<Version>0.13.0</Version>
66
</PropertyGroup>
7+
<PropertyGroup>
8+
<LangVersion>8.0</LangVersion>
9+
<Nullable>enable</Nullable>
10+
<WarningsAsErrors>CS8600;CS8602;CS8603;CS8625</WarningsAsErrors>
11+
</PropertyGroup>
12+
<PropertyGroup>
13+
<AngleSharpVersion>0.13.0</AngleSharpVersion>
14+
<FxCopAnalyzersVersion>2.9.6</FxCopAnalyzersVersion>
15+
</PropertyGroup>
716
</Project>

0 commit comments

Comments
 (0)