Browse Source

Implement IEquatable on IccVersion

pull/639/head
Jason Nelson 8 years ago
parent
commit
0380e2ee37
  1. 10
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccVersion.cs

10
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
{
/// <summary>
/// Represents the ICC profile version number.
/// </summary>
public readonly struct IccVersion
public readonly struct IccVersion : IEquatable<IccVersion>
{
/// <summary>
/// Initializes a new instance of the <see cref="IccVersion"/> struct.
@ -36,6 +38,12 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// </summary>
public int Patch { get; }
/// <inheritdoc/>
public bool Equals(IccVersion other) =>
this.Major == other.Major &&
this.Minor == other.Minor &&
this.Patch == other.Patch;
/// <inheritdoc/>
public override string ToString()
{

Loading…
Cancel
Save