|
|
|
@ -31,27 +31,27 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the first part of the ID
|
|
|
|
/// Gets the first part of the ID.
|
|
|
|
/// </summary>
|
|
|
|
public uint Part1 { get; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the second part of the ID
|
|
|
|
/// Gets the second part of the ID.
|
|
|
|
/// </summary>
|
|
|
|
public uint Part2 { get; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the third part of the ID
|
|
|
|
/// Gets the third part of the ID.
|
|
|
|
/// </summary>
|
|
|
|
public uint Part3 { get; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the fourth part of the ID
|
|
|
|
/// Gets the fourth part of the ID.
|
|
|
|
/// </summary>
|
|
|
|
public uint Part4 { get; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets a value indicating whether the ID is set or just consists of zeros
|
|
|
|
/// Gets a value indicating whether the ID is set or just consists of zeros.
|
|
|
|
/// </summary>
|
|
|
|
public bool IsSet => !this.Equals(Zero); |
|
|
|
|
|
|
|
@ -86,10 +86,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override bool Equals(object obj) |
|
|
|
{ |
|
|
|
return obj is IccProfileId other && this.Equals(other); |
|
|
|
} |
|
|
|
public override bool Equals(object obj) => obj is IccProfileId other && this.Equals(other); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public bool Equals(IccProfileId other) => |
|
|
|
@ -109,14 +106,8 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
return $"{ToHex(this.Part1)}-{ToHex(this.Part2)}-{ToHex(this.Part3)}-{ToHex(this.Part4)}"; |
|
|
|
} |
|
|
|
public override string ToString() => $"{ToHex(this.Part1)}-{ToHex(this.Part2)}-{ToHex(this.Part3)}-{ToHex(this.Part4)}"; |
|
|
|
|
|
|
|
private static string ToHex(uint value) |
|
|
|
{ |
|
|
|
return value.ToString("X").PadLeft(8, '0'); |
|
|
|
} |
|
|
|
private static string ToHex(uint value) => value.ToString("X").PadLeft(8, '0'); |
|
|
|
} |
|
|
|
} |