From 1b54767a8cdaaa99ce5f2e351e366f318ef81238 Mon Sep 17 00:00:00 2001 From: Jason Nelson Date: Tue, 26 Jun 2018 16:05:55 -0700 Subject: [PATCH] Implement IEquatable on IccVersion --- .../MetaData/Profiles/ICC/Various/IccVersion.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccVersion.cs b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccVersion.cs index f38bdcd5f..2486cc80a 100644 --- a/src/ImageSharp/MetaData/Profiles/ICC/Various/IccVersion.cs +++ b/src/ImageSharp/MetaData/Profiles/ICC/Various/IccVersion.cs @@ -1,12 +1,14 @@ // Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. +using System; + namespace SixLabors.ImageSharp.MetaData.Profiles.Icc { /// /// Represents the ICC profile version number. /// - public readonly struct IccVersion + public readonly struct IccVersion : IEquatable { /// /// Initializes a new instance of the struct. @@ -36,6 +38,12 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc /// public int Patch { get; } + /// + public bool Equals(IccVersion other) => + this.Major == other.Major && + this.Minor == other.Minor && + this.Patch == other.Patch; + /// public override string ToString() {