Browse Source

add IEquatable interface for own type not just the inherited

af/merge-core
Johannes Bildstein 9 years ago
parent
commit
2879fa7905
  1. 10
      src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs
  2. 9
      src/ImageSharp/MetaData/Profiles/ICC/Curves/IccSampledCurveElement.cs
  3. 10
      src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs
  4. 10
      src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs
  5. 9
      src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs
  6. 10
      src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs
  7. 9
      src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs
  8. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs
  9. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs
  10. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs
  11. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs
  12. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
  13. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs
  14. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs
  15. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs
  16. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs
  17. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutAToBTagDataEntry.cs
  18. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutBToATagDataEntry.cs
  19. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs
  20. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs
  21. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs
  22. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs
  23. 10
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs
  24. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs
  25. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs
  26. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs
  27. 10
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs
  28. 10
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextDescriptionTagDataEntry.cs
  29. 10
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs
  30. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs
  31. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs
  32. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs
  33. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs
  34. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs
  35. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs
  36. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs
  37. 9
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs

10
src/ImageSharp/MetaData/Profiles/ICC/Curves/IccFormulaCurveElement.cs

@ -5,10 +5,12 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// A formula based curve segment /// A formula based curve segment
/// </summary> /// </summary>
internal sealed class IccFormulaCurveElement : IccCurveSegment internal sealed class IccFormulaCurveElement : IccCurveSegment, IEquatable<IccFormulaCurveElement>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccFormulaCurveElement"/> class. /// Initializes a new instance of the <see cref="IccFormulaCurveElement"/> class.
@ -83,5 +85,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccFormulaCurveElement other)
{
return this.Equals((IccCurveSegment)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/Curves/IccSampledCurveElement.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// A sampled curve segment /// A sampled curve segment
/// </summary> /// </summary>
internal sealed class IccSampledCurveElement : IccCurveSegment internal sealed class IccSampledCurveElement : IccCurveSegment, IEquatable<IccSampledCurveElement>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccSampledCurveElement"/> class. /// Initializes a new instance of the <see cref="IccSampledCurveElement"/> class.
@ -40,5 +41,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccSampledCurveElement other)
{
return this.Equals((IccCurveSegment)other);
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccBAcsProcessElement.cs

@ -5,10 +5,12 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// A placeholder <see cref="IccMultiProcessElement"/> (might be used for future ICC versions) /// A placeholder <see cref="IccMultiProcessElement"/> (might be used for future ICC versions)
/// </summary> /// </summary>
internal sealed class IccBAcsProcessElement : IccMultiProcessElement internal sealed class IccBAcsProcessElement : IccMultiProcessElement, IEquatable<IccBAcsProcessElement>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccBAcsProcessElement"/> class. /// Initializes a new instance of the <see cref="IccBAcsProcessElement"/> class.
@ -19,5 +21,11 @@ namespace ImageSharp
: base(IccMultiProcessElementSignature.BAcs, inChannelCount, outChannelCount) : base(IccMultiProcessElementSignature.BAcs, inChannelCount, outChannelCount)
{ {
} }
/// <inheritdoc />
public bool Equals(IccBAcsProcessElement other)
{
return base.Equals(other);
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccClutProcessElement.cs

@ -5,10 +5,12 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// A CLUT (color lookup table) element to process data /// A CLUT (color lookup table) element to process data
/// </summary> /// </summary>
internal sealed class IccClutProcessElement : IccMultiProcessElement internal sealed class IccClutProcessElement : IccMultiProcessElement, IEquatable<IccClutProcessElement>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccClutProcessElement"/> class. /// Initializes a new instance of the <see cref="IccClutProcessElement"/> class.
@ -36,5 +38,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccClutProcessElement other)
{
return this.Equals((IccMultiProcessElement)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccCurveSetProcessElement.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// A set of curves to process data /// A set of curves to process data
/// </summary> /// </summary>
internal sealed class IccCurveSetProcessElement : IccMultiProcessElement internal sealed class IccCurveSetProcessElement : IccMultiProcessElement, IEquatable<IccCurveSetProcessElement>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccCurveSetProcessElement"/> class. /// Initializes a new instance of the <see cref="IccCurveSetProcessElement"/> class.
@ -38,5 +39,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccCurveSetProcessElement other)
{
return this.Equals((IccMultiProcessElement)other);
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccEAcsProcessElement.cs

@ -5,10 +5,12 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// A placeholder <see cref="IccMultiProcessElement"/> (might be used for future ICC versions) /// A placeholder <see cref="IccMultiProcessElement"/> (might be used for future ICC versions)
/// </summary> /// </summary>
internal sealed class IccEAcsProcessElement : IccMultiProcessElement internal sealed class IccEAcsProcessElement : IccMultiProcessElement, IEquatable<IccEAcsProcessElement>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccEAcsProcessElement"/> class. /// Initializes a new instance of the <see cref="IccEAcsProcessElement"/> class.
@ -19,5 +21,11 @@ namespace ImageSharp
: base(IccMultiProcessElementSignature.EAcs, inChannelCount, outChannelCount) : base(IccMultiProcessElementSignature.EAcs, inChannelCount, outChannelCount)
{ {
} }
/// <inheritdoc />
public bool Equals(IccEAcsProcessElement other)
{
return base.Equals(other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/MultiProcessElements/IccMatrixProcessElement.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// A matrix element to process data /// A matrix element to process data
/// </summary> /// </summary>
internal sealed class IccMatrixProcessElement : IccMultiProcessElement internal sealed class IccMatrixProcessElement : IccMultiProcessElement, IEquatable<IccMatrixProcessElement>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccMatrixProcessElement"/> class. /// Initializes a new instance of the <see cref="IccMatrixProcessElement"/> class.
@ -52,6 +53,12 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccMatrixProcessElement other)
{
return this.Equals((IccMultiProcessElement)other);
}
private bool EqualsMatrix(IccMatrixProcessElement element) private bool EqualsMatrix(IccMatrixProcessElement element)
{ {
for (int x = 0; x < this.MatrixIxO.Width; x++) for (int x = 0; x < this.MatrixIxO.Width; x++)

8
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs

@ -12,7 +12,7 @@ namespace ImageSharp
/// The chromaticity tag type provides basic chromaticity data /// The chromaticity tag type provides basic chromaticity data
/// and type of phosphors or colorants of a monitor to applications and utilities. /// and type of phosphors or colorants of a monitor to applications and utilities.
/// </summary> /// </summary>
internal sealed class IccChromaticityTagDataEntry : IccTagDataEntry internal sealed class IccChromaticityTagDataEntry : IccTagDataEntry, IEquatable<IccChromaticityTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccChromaticityTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccChromaticityTagDataEntry"/> class.
@ -96,6 +96,12 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccChromaticityTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
private static double[][] GetColorantArray(IccColorantEncoding colorantType) private static double[][] GetColorantArray(IccColorantEncoding colorantType)
{ {
switch (colorantType) switch (colorantType)

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs

@ -5,13 +5,14 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This tag specifies the laydown order in which colorants /// This tag specifies the laydown order in which colorants
/// will be printed on an n-colorant device. /// will be printed on an n-colorant device.
/// </summary> /// </summary>
internal sealed class IccColorantOrderTagDataEntry : IccTagDataEntry internal sealed class IccColorantOrderTagDataEntry : IccTagDataEntry, IEquatable<IccColorantOrderTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccColorantOrderTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccColorantOrderTagDataEntry"/> class.
@ -51,5 +52,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccColorantOrderTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
@ -12,7 +13,7 @@ namespace ImageSharp
/// the profile by a unique name and set of PCSXYZ or PCSLAB values /// the profile by a unique name and set of PCSXYZ or PCSLAB values
/// to give the colorant an unambiguous value. /// to give the colorant an unambiguous value.
/// </summary> /// </summary>
internal sealed class IccColorantTableTagDataEntry : IccTagDataEntry internal sealed class IccColorantTableTagDataEntry : IccTagDataEntry, IEquatable<IccColorantTableTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccColorantTableTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccColorantTableTagDataEntry"/> class.
@ -52,5 +53,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccColorantTableTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// The type contains a one-dimensional table of double values. /// The type contains a one-dimensional table of double values.
/// </summary> /// </summary>
internal sealed class IccCurveTagDataEntry : IccTagDataEntry internal sealed class IccCurveTagDataEntry : IccTagDataEntry, IEquatable<IccCurveTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccCurveTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccCurveTagDataEntry"/> class.
@ -118,5 +119,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccCurveTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -12,7 +13,7 @@ namespace ImageSharp
/// The dataType is a simple data structure that contains /// The dataType is a simple data structure that contains
/// either 7-bit ASCII or binary data, i.e. textType data or transparent bytes. /// either 7-bit ASCII or binary data, i.e. textType data or transparent bytes.
/// </summary> /// </summary>
internal sealed class IccDataTagDataEntry : IccTagDataEntry internal sealed class IccDataTagDataEntry : IccTagDataEntry, IEquatable<IccDataTagDataEntry>
{ {
private static readonly Encoding AsciiEncoding = Encoding.GetEncoding("ASCII"); private static readonly Encoding AsciiEncoding = Encoding.GetEncoding("ASCII");
@ -89,5 +90,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccDataTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

8
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs

@ -10,7 +10,7 @@ namespace ImageSharp
/// <summary> /// <summary>
/// This type is a representation of the time and date. /// This type is a representation of the time and date.
/// </summary> /// </summary>
internal sealed class IccDateTimeTagDataEntry : IccTagDataEntry internal sealed class IccDateTimeTagDataEntry : IccTagDataEntry, IEquatable<IccDateTimeTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccDateTimeTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccDateTimeTagDataEntry"/> class.
@ -47,5 +47,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccDateTimeTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This type represents an array of doubles (from 32bit fixed point values). /// This type represents an array of doubles (from 32bit fixed point values).
/// </summary> /// </summary>
internal sealed class IccFix16ArrayTagDataEntry : IccTagDataEntry internal sealed class IccFix16ArrayTagDataEntry : IccTagDataEntry, IEquatable<IccFix16ArrayTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccFix16ArrayTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccFix16ArrayTagDataEntry"/> class.
@ -48,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccFix16ArrayTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
@ -12,7 +13,7 @@ namespace ImageSharp
/// This structure represents a color transform using tables /// This structure represents a color transform using tables
/// with 16-bit precision. /// with 16-bit precision.
/// </summary> /// </summary>
internal sealed class IccLut16TagDataEntry : IccTagDataEntry internal sealed class IccLut16TagDataEntry : IccTagDataEntry, IEquatable<IccLut16TagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccLut16TagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccLut16TagDataEntry"/> class.
@ -127,6 +128,12 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccLut16TagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
private Matrix4x4 CreateMatrix(float[,] matrix) private Matrix4x4 CreateMatrix(float[,] matrix)
{ {
return new Matrix4x4( return new Matrix4x4(

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
@ -12,7 +13,7 @@ namespace ImageSharp
/// This structure represents a color transform using tables /// This structure represents a color transform using tables
/// with 8-bit precision. /// with 8-bit precision.
/// </summary> /// </summary>
internal sealed class IccLut8TagDataEntry : IccTagDataEntry internal sealed class IccLut8TagDataEntry : IccTagDataEntry, IEquatable<IccLut8TagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccLut8TagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccLut8TagDataEntry"/> class.
@ -130,6 +131,12 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccLut8TagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
private Matrix4x4 CreateMatrix(float[,] matrix) private Matrix4x4 CreateMatrix(float[,] matrix)
{ {
return new Matrix4x4( return new Matrix4x4(

8
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutAToBTagDataEntry.cs

@ -12,7 +12,7 @@ namespace ImageSharp
/// <summary> /// <summary>
/// This structure represents a color transform. /// This structure represents a color transform.
/// </summary> /// </summary>
internal sealed class IccLutAToBTagDataEntry : IccTagDataEntry internal sealed class IccLutAToBTagDataEntry : IccTagDataEntry, IEquatable<IccLutAToBTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccLutAToBTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccLutAToBTagDataEntry"/> class.
@ -164,6 +164,12 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccLutAToBTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves) private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves)
{ {
bool thisNull = thisCurves == null; bool thisNull = thisCurves == null;

8
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutBToATagDataEntry.cs

@ -12,7 +12,7 @@ namespace ImageSharp
/// <summary> /// <summary>
/// This structure represents a color transform. /// This structure represents a color transform.
/// </summary> /// </summary>
internal sealed class IccLutBToATagDataEntry : IccTagDataEntry internal sealed class IccLutBToATagDataEntry : IccTagDataEntry, IEquatable<IccLutBToATagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccLutBToATagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccLutBToATagDataEntry"/> class.
@ -164,6 +164,12 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccLutBToATagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves) private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves)
{ {
bool thisNull = thisCurves == null; bool thisNull = thisCurves == null;

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Numerics; using System.Numerics;
/// <summary> /// <summary>
@ -12,7 +13,7 @@ namespace ImageSharp
/// profile data and is meant to provide profile makers an alternative /// profile data and is meant to provide profile makers an alternative
/// to the default measurement specifications. /// to the default measurement specifications.
/// </summary> /// </summary>
internal sealed class IccMeasurementTagDataEntry : IccTagDataEntry internal sealed class IccMeasurementTagDataEntry : IccTagDataEntry, IEquatable<IccMeasurementTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccMeasurementTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccMeasurementTagDataEntry"/> class.
@ -85,5 +86,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccMeasurementTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs

@ -5,13 +5,14 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This tag structure contains a set of records each referencing /// This tag structure contains a set of records each referencing
/// a multilingual string associated with a profile. /// a multilingual string associated with a profile.
/// </summary> /// </summary>
internal sealed class IccMultiLocalizedUnicodeTagDataEntry : IccTagDataEntry internal sealed class IccMultiLocalizedUnicodeTagDataEntry : IccTagDataEntry, IEquatable<IccMultiLocalizedUnicodeTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccMultiLocalizedUnicodeTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccMultiLocalizedUnicodeTagDataEntry"/> class.
@ -49,5 +50,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccMultiLocalizedUnicodeTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs

@ -5,13 +5,14 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This structure represents a color transform, containing /// This structure represents a color transform, containing
/// a sequence of processing elements. /// a sequence of processing elements.
/// </summary> /// </summary>
internal sealed class IccMultiProcessElementsTagDataEntry : IccTagDataEntry internal sealed class IccMultiProcessElementsTagDataEntry : IccTagDataEntry, IEquatable<IccMultiProcessElementsTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccMultiProcessElementsTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccMultiProcessElementsTagDataEntry"/> class.
@ -68,5 +69,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccMultiProcessElementsTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs

@ -5,13 +5,14 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// The namedColor2Type is a count value and array of structures /// The namedColor2Type is a count value and array of structures
/// that provide color coordinates for color names. /// that provide color coordinates for color names.
/// </summary> /// </summary>
internal sealed class IccNamedColor2TagDataEntry : IccTagDataEntry internal sealed class IccNamedColor2TagDataEntry : IccTagDataEntry, IEquatable<IccNamedColor2TagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccNamedColor2TagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccNamedColor2TagDataEntry"/> class.
@ -133,5 +134,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccNamedColor2TagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs

@ -5,11 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// The parametricCurveType describes a one-dimensional curve by /// The parametricCurveType describes a one-dimensional curve by
/// specifying one of a predefined set of functions using the parameters. /// specifying one of a predefined set of functions using the parameters.
/// </summary> /// </summary>
internal sealed class IccParametricCurveTagDataEntry : IccTagDataEntry internal sealed class IccParametricCurveTagDataEntry : IccTagDataEntry, IEquatable<IccParametricCurveTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccParametricCurveTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccParametricCurveTagDataEntry"/> class.
@ -46,5 +48,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccParametricCurveTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
@ -12,7 +13,7 @@ namespace ImageSharp
/// from the header fields and tags from the original profiles which were /// from the header fields and tags from the original profiles which were
/// combined to create the final profile. /// combined to create the final profile.
/// </summary> /// </summary>
internal sealed class IccProfileSequenceDescTagDataEntry : IccTagDataEntry internal sealed class IccProfileSequenceDescTagDataEntry : IccTagDataEntry, IEquatable<IccProfileSequenceDescTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccProfileSequenceDescTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccProfileSequenceDescTagDataEntry"/> class.
@ -50,5 +51,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccProfileSequenceDescTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs

@ -5,13 +5,14 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This type is an array of structures, each of which contains information /// This type is an array of structures, each of which contains information
/// for identification of a profile used in a sequence. /// for identification of a profile used in a sequence.
/// </summary> /// </summary>
internal sealed class IccProfileSequenceIdentifierTagDataEntry : IccTagDataEntry internal sealed class IccProfileSequenceIdentifierTagDataEntry : IccTagDataEntry, IEquatable<IccProfileSequenceIdentifierTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccProfileSequenceIdentifierTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccProfileSequenceIdentifierTagDataEntry"/> class.
@ -49,5 +50,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccProfileSequenceIdentifierTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs

@ -5,6 +5,7 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
@ -13,7 +14,7 @@ namespace ImageSharp
/// lutAToBType, lutBToAType or multiProcessElementsType tags so that corrections can /// lutAToBType, lutBToAType or multiProcessElementsType tags so that corrections can
/// be made for variation in the device without having to produce a new profile. /// be made for variation in the device without having to produce a new profile.
/// </summary> /// </summary>
internal sealed class IccResponseCurveSet16TagDataEntry : IccTagDataEntry internal sealed class IccResponseCurveSet16TagDataEntry : IccTagDataEntry, IEquatable<IccResponseCurveSet16TagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccResponseCurveSet16TagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccResponseCurveSet16TagDataEntry"/> class.
@ -62,5 +63,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccResponseCurveSet16TagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs

@ -5,11 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// Typically this type is used for registered tags that can /// Typically this type is used for registered tags that can
/// be displayed on many development systems as a sequence of four characters. /// be displayed on many development systems as a sequence of four characters.
/// </summary> /// </summary>
internal sealed class IccSignatureTagDataEntry : IccTagDataEntry internal sealed class IccSignatureTagDataEntry : IccTagDataEntry, IEquatable<IccSignatureTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccSignatureTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccSignatureTagDataEntry"/> class.
@ -47,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccSignatureTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextDescriptionTagDataEntry.cs

@ -5,10 +5,12 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// The TextDescriptionType contains three types of text description. /// The TextDescriptionType contains three types of text description.
/// </summary> /// </summary>
internal sealed class IccTextDescriptionTagDataEntry : IccTagDataEntry internal sealed class IccTextDescriptionTagDataEntry : IccTagDataEntry, IEquatable<IccTextDescriptionTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccTextDescriptionTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccTextDescriptionTagDataEntry"/> class.
@ -81,5 +83,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccTextDescriptionTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs

@ -5,10 +5,12 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
/// <summary> /// <summary>
/// This is a simple text structure that contains a text string. /// This is a simple text structure that contains a text string.
/// </summary> /// </summary>
internal sealed class IccTextTagDataEntry : IccTagDataEntry internal sealed class IccTextTagDataEntry : IccTagDataEntry, IEquatable<IccTextTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccTextTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccTextTagDataEntry"/> class.
@ -46,5 +48,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccTextTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This type represents an array of doubles (from 32bit values). /// This type represents an array of doubles (from 32bit values).
/// </summary> /// </summary>
internal sealed class IccUFix16ArrayTagDataEntry : IccTagDataEntry internal sealed class IccUFix16ArrayTagDataEntry : IccTagDataEntry, IEquatable<IccUFix16ArrayTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccUFix16ArrayTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccUFix16ArrayTagDataEntry"/> class.
@ -48,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccUFix16ArrayTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This type represents an array of unsigned shorts. /// This type represents an array of unsigned shorts.
/// </summary> /// </summary>
internal sealed class IccUInt16ArrayTagDataEntry : IccTagDataEntry internal sealed class IccUInt16ArrayTagDataEntry : IccTagDataEntry, IEquatable<IccUInt16ArrayTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccUInt16ArrayTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccUInt16ArrayTagDataEntry"/> class.
@ -48,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccUInt16ArrayTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This type represents an array of unsigned 32bit integers. /// This type represents an array of unsigned 32bit integers.
/// </summary> /// </summary>
internal sealed class IccUInt32ArrayTagDataEntry : IccTagDataEntry internal sealed class IccUInt32ArrayTagDataEntry : IccTagDataEntry, IEquatable<IccUInt32ArrayTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccUInt32ArrayTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccUInt32ArrayTagDataEntry"/> class.
@ -48,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccUInt32ArrayTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This type represents an array of unsigned 64bit integers. /// This type represents an array of unsigned 64bit integers.
/// </summary> /// </summary>
internal sealed class IccUInt64ArrayTagDataEntry : IccTagDataEntry internal sealed class IccUInt64ArrayTagDataEntry : IccTagDataEntry, IEquatable<IccUInt64ArrayTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccUInt64ArrayTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccUInt64ArrayTagDataEntry"/> class.
@ -48,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccUInt64ArrayTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This type represents an array of bytes. /// This type represents an array of bytes.
/// </summary> /// </summary>
internal sealed class IccUInt8ArrayTagDataEntry : IccTagDataEntry internal sealed class IccUInt8ArrayTagDataEntry : IccTagDataEntry, IEquatable<IccUInt8ArrayTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccUInt8ArrayTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccUInt8ArrayTagDataEntry"/> class.
@ -48,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccUInt8ArrayTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
/// <summary> /// <summary>
/// This tag stores data of an unknown tag data entry /// This tag stores data of an unknown tag data entry
/// </summary> /// </summary>
internal sealed class IccUnknownTagDataEntry : IccTagDataEntry internal sealed class IccUnknownTagDataEntry : IccTagDataEntry, IEquatable<IccUnknownTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccUnknownTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccUnknownTagDataEntry"/> class.
@ -48,5 +49,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccUnknownTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs

@ -5,12 +5,13 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Numerics; using System.Numerics;
/// <summary> /// <summary>
/// This type represents a set of viewing condition parameters. /// This type represents a set of viewing condition parameters.
/// </summary> /// </summary>
internal sealed class IccViewingConditionsTagDataEntry : IccTagDataEntry internal sealed class IccViewingConditionsTagDataEntry : IccTagDataEntry, IEquatable<IccViewingConditionsTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccViewingConditionsTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccViewingConditionsTagDataEntry"/> class.
@ -65,5 +66,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccViewingConditionsTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

9
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccXyzTagDataEntry.cs

@ -5,13 +5,14 @@
namespace ImageSharp namespace ImageSharp
{ {
using System;
using System.Linq; using System.Linq;
using System.Numerics; using System.Numerics;
/// <summary> /// <summary>
/// The XYZType contains an array of XYZ values. /// The XYZType contains an array of XYZ values.
/// </summary> /// </summary>
internal sealed class IccXyzTagDataEntry : IccTagDataEntry internal sealed class IccXyzTagDataEntry : IccTagDataEntry, IEquatable<IccXyzTagDataEntry>
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="IccXyzTagDataEntry"/> class. /// Initializes a new instance of the <see cref="IccXyzTagDataEntry"/> class.
@ -49,5 +50,11 @@ namespace ImageSharp
return false; return false;
} }
/// <inheritdoc />
public bool Equals(IccXyzTagDataEntry other)
{
return this.Equals((IccTagDataEntry)other);
}
} }
} }

Loading…
Cancel
Save