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

Loading…
Cancel
Save