From 68f5fecc680bc99c4bfedadffdc12b1f3e7fc625 Mon Sep 17 00:00:00 2001 From: DHancock Date: Sat, 9 Jan 2021 09:32:23 +0000 Subject: [PATCH 1/2] Keep the code police happy As this class implements IEquatable<> I apparently need to override Equals() and then GetHashcode() whether they are used or not. --- SudokuSolver/Models/PuzzleModel.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/SudokuSolver/Models/PuzzleModel.cs b/SudokuSolver/Models/PuzzleModel.cs index 084dca9..4891a93 100644 --- a/SudokuSolver/Models/PuzzleModel.cs +++ b/SudokuSolver/Models/PuzzleModel.cs @@ -804,7 +804,7 @@ public bool Equals(PuzzleModel? other) if (other is null) return false; - // Cells is a fixed size read only list + // no need to check lengths, Cells is a fixed size list for (int index = 0; index < Cells.Count; index++) { if (!Cells[index].Equals(other.Cells[index])) @@ -813,5 +813,15 @@ public bool Equals(PuzzleModel? other) return true; } + + public override bool Equals(object? obj) + { + return Equals(obj as PuzzleModel); + } + + public override int GetHashCode() + { + throw new NotImplementedException(); + } } } From 6f4153652f5ab01097aa3fedf69a468e5a263366 Mon Sep 17 00:00:00 2001 From: DHancock Date: Sat, 9 Jan 2021 09:36:25 +0000 Subject: [PATCH 2/2] Bump build number to 1.1.1 For a bug fix release... --- SudokuSolver/SudokuSolver.csproj | 8 ++++---- SudokuSolver/app.manifest | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SudokuSolver/SudokuSolver.csproj b/SudokuSolver/SudokuSolver.csproj index a305ffb..35113a1 100644 --- a/SudokuSolver/SudokuSolver.csproj +++ b/SudokuSolver/SudokuSolver.csproj @@ -4,10 +4,10 @@ WinExe net5.0-windows true - 1.1.0 + 1.1.1 David Hancock code@davidhancock.net - David Hancock 2020 + David Hancock 2021 SudokuSolver https://github.com/DHancock/SudokuSolver @@ -17,8 +17,8 @@ SudokuSolver Sudoku app.ico - 1.1.0.0 - 1.1.0.0 + 1.1.1.0 + 1.1.1.0 enable true app.manifest diff --git a/SudokuSolver/app.manifest b/SudokuSolver/app.manifest index 30a7f93..96baeb2 100644 --- a/SudokuSolver/app.manifest +++ b/SudokuSolver/app.manifest @@ -6,7 +6,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - +