Browse Source

Merge branch 'master' into js/fix-gaussian

pull/789/head
James Jackson-South 8 years ago
committed by GitHub
parent
commit
d7a4688da2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
  2. 8
      src/ImageSharp/ColorSpaces/CieLab.cs
  3. 5
      src/ImageSharp/ColorSpaces/CieLch.cs
  4. 8
      src/ImageSharp/ColorSpaces/CieLchuv.cs
  5. 8
      src/ImageSharp/ColorSpaces/CieLuv.cs
  6. 2
      src/ImageSharp/ColorSpaces/CieXyChromaticityCoordinates.cs
  7. 7
      src/ImageSharp/ColorSpaces/CieXyy.cs
  8. 7
      src/ImageSharp/ColorSpaces/CieXyz.cs
  9. 8
      src/ImageSharp/ColorSpaces/Cmyk.cs
  10. 10
      src/ImageSharp/ColorSpaces/Conversion/Implementation/RGBPrimariesChromaticityCoordinates.cs
  11. 10
      src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/GammaWorkingSpace.cs
  12. 5
      src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/RgbWorkingSpaceBase.cs
  13. 7
      src/ImageSharp/ColorSpaces/Hsl.cs
  14. 7
      src/ImageSharp/ColorSpaces/Hsv.cs
  15. 5
      src/ImageSharp/ColorSpaces/HunterLab.cs
  16. 7
      src/ImageSharp/ColorSpaces/LinearRgb.cs
  17. 7
      src/ImageSharp/ColorSpaces/Lms.cs
  18. 7
      src/ImageSharp/ColorSpaces/Rgb.cs
  19. 7
      src/ImageSharp/ColorSpaces/YCbCr.cs
  20. 4
      src/ImageSharp/Common/ParallelUtils/ParallelHelper.cs
  21. 12
      src/ImageSharp/Formats/Jpeg/Components/Decoder/AdobeMarker.cs
  22. 13
      src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs
  23. 4
      src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
  24. 2
      src/ImageSharp/Formats/Png/PngEncoderCore.cs
  25. 22
      src/ImageSharp/ImageSharp.csproj
  26. 14
      src/ImageSharp/MetaData/ImageProperty.cs
  27. 6
      src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs
  28. 20
      src/ImageSharp/MetaData/Profiles/Exif/ExifValue.cs
  29. 21
      src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs
  30. 11
      src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs
  31. 8
      src/ImageSharp/MetaData/Profiles/ICC/IccTagDataEntry.cs
  32. 11
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccChromaticityTagDataEntry.cs
  33. 5
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantOrderTagDataEntry.cs
  34. 5
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccColorantTableTagDataEntry.cs
  35. 17
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs
  36. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCurveTagDataEntry.cs
  37. 11
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDataTagDataEntry.cs
  38. 5
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccDateTimeTagDataEntry.cs
  39. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccFix16ArrayTagDataEntry.cs
  40. 24
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut16TagDataEntry.cs
  41. 24
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLut8TagDataEntry.cs
  42. 28
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutAToBTagDataEntry.cs
  43. 28
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccLutBToATagDataEntry.cs
  44. 17
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMeasurementTagDataEntry.cs
  45. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiLocalizedUnicodeTagDataEntry.cs
  46. 13
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccMultiProcessElementsTagDataEntry.cs
  47. 18
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccNamedColor2TagDataEntry.cs
  48. 10
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccParametricCurveTagDataEntry.cs
  49. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceDescTagDataEntry.cs
  50. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccProfileSequenceIdentifierTagDataEntry.cs
  51. 11
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccResponseCurveSet16TagDataEntry.cs
  52. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccScreeningTagDataEntry.cs
  53. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccSignatureTagDataEntry.cs
  54. 17
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextDescriptionTagDataEntry.cs
  55. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccTextTagDataEntry.cs
  56. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUFix16ArrayTagDataEntry.cs
  57. 10
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt16ArrayTagDataEntry.cs
  58. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt32ArrayTagDataEntry.cs
  59. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt64ArrayTagDataEntry.cs
  60. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUInt8ArrayTagDataEntry.cs
  61. 13
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs
  62. 8
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUnknownTagDataEntry.cs
  63. 13
      src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccViewingConditionsTagDataEntry.cs
  64. 15
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs
  65. 13
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccColorantTableEntry.cs
  66. 26
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccNamedColor.cs
  67. 10
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccPositionNumber.cs
  68. 24
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileDescription.cs
  69. 13
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileId.cs
  70. 12
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs
  71. 15
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccResponseNumber.cs
  72. 8
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccScreeningChannel.cs
  73. 14
      src/ImageSharp/MetaData/Profiles/ICC/Various/IccTagTableEntry.cs
  74. 7
      src/ImageSharp/PixelFormats/PixelImplementations/Bgr24.cs
  75. 7
      src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs
  76. 7
      src/ImageSharp/PixelFormats/PixelImplementations/Rgb48.cs
  77. 7
      src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.cs
  78. 7
      src/ImageSharp/Primitives/ValueSize.cs
  79. 2
      src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs
  80. 3
      src/ImageSharp/Processing/Processors/Dithering/PixelPair.cs
  81. 26
      src/Shared/AssemblyInfo.Common.cs
  82. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ModuloPowerOfTwoConstant.cs
  83. 1
      tests/ImageSharp.Benchmarks/General/BasicMath/ModuloPowerOfTwoVariable.cs
  84. 1
      tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Bgra32.cs
  85. 2
      tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj
  86. 8
      tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj
  87. 7
      tests/ImageSharp.Tests/ImageSharp.Tests.csproj

20
src/ImageSharp.Drawing/ImageSharp.Drawing.csproj

@ -1,10 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<Description>An extension to ImageSharp that allows the drawing of images, paths, and text.</Description>
<AssemblyTitle>SixLabors.ImageSharp.Drawing</AssemblyTitle> <AssemblyTitle>SixLabors.ImageSharp.Drawing</AssemblyTitle>
<Authors>SixLabors and contributors</Authors>
<Company>Six Labors</Company>
<Copyright>Copyright (c) Six Labors and contributors.</Copyright>
<Product>SixLabors.ImageSharp</Product>
<Description>An extension to ImageSharp that allows the drawing of images, paths, and text.</Description>
<NeutralLanguage>en</NeutralLanguage>
<VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix> <VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix>
<VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix> <VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix>
<Authors>SixLabors and contributors</Authors>
<TargetFrameworks>netstandard1.3;netstandard2.0</TargetFrameworks> <TargetFrameworks>netstandard1.3;netstandard2.0</TargetFrameworks>
<LangVersion>7.3</LangVersion> <LangVersion>7.3</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -17,15 +22,6 @@
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl> <PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/SixLabors/ImageSharp</RepositoryUrl> <RepositoryUrl>https://github.com/SixLabors/ImageSharp</RepositoryUrl>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<DebugType Condition="$(codecov) != ''">full</DebugType> <DebugType Condition="$(codecov) != ''">full</DebugType>
<DebugType Condition="$(codecov) == ''">portable</DebugType> <DebugType Condition="$(codecov) == ''">portable</DebugType>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>

8
src/ImageSharp/ColorSpaces/CieLab.cs

@ -118,13 +118,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
public static bool operator !=(CieLab left, CieLab right) => !left.Equals(right); public static bool operator !=(CieLab left, CieLab right) => !left.Equals(right);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.L, this.A, this.B, this.WhitePoint);
{
int hash = this.L.GetHashCode();
hash = HashHelpers.Combine(hash, this.A.GetHashCode());
hash = HashHelpers.Combine(hash, this.B.GetHashCode());
return HashHelpers.Combine(hash, this.WhitePoint.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"CieLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})"); public override string ToString() => FormattableString.Invariant($"CieLab({this.L:#0.##}, {this.A:#0.##}, {this.B:#0.##})");

5
src/ImageSharp/ColorSpaces/CieLch.cs

@ -122,10 +122,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
int hash = this.L.GetHashCode(); return HashCode.Combine(this.L, this.C, this.H, this.WhitePoint);
hash = HashHelpers.Combine(hash, this.C.GetHashCode());
hash = HashHelpers.Combine(hash, this.H.GetHashCode());
return HashHelpers.Combine(hash, this.WhitePoint.GetHashCode());
} }
/// <inheritdoc/> /// <inheritdoc/>

8
src/ImageSharp/ColorSpaces/CieLchuv.cs

@ -119,13 +119,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
public static bool operator !=(CieLchuv left, CieLchuv right) => !left.Equals(right); public static bool operator !=(CieLchuv left, CieLchuv right) => !left.Equals(right);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.L, this.C, this.H, this.WhitePoint);
{
int hash = this.L.GetHashCode();
hash = HashHelpers.Combine(hash, this.C.GetHashCode());
hash = HashHelpers.Combine(hash, this.H.GetHashCode());
return HashHelpers.Combine(hash, this.WhitePoint.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"CieLchuv({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})"); public override string ToString() => FormattableString.Invariant($"CieLchuv({this.L:#0.##}, {this.C:#0.##}, {this.H:#0.##})");

8
src/ImageSharp/ColorSpaces/CieLuv.cs

@ -119,13 +119,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
public static bool operator !=(CieLuv left, CieLuv right) => !left.Equals(right); public static bool operator !=(CieLuv left, CieLuv right) => !left.Equals(right);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.L, this.U, this.V, this.WhitePoint);
{
int hash = this.L.GetHashCode();
hash = HashHelpers.Combine(hash, this.U.GetHashCode());
hash = HashHelpers.Combine(hash, this.V.GetHashCode());
return HashHelpers.Combine(hash, this.WhitePoint.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"CieLuv({this.L:#0.##}, {this.U:#0.##}, {this.V:#0.##})"); public override string ToString() => FormattableString.Invariant($"CieLuv({this.L:#0.##}, {this.U:#0.##}, {this.V:#0.##})");

2
src/ImageSharp/ColorSpaces/CieXyChromaticityCoordinates.cs

@ -64,7 +64,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <inheritdoc /> /// <inheritdoc />
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() => HashHelpers.Combine(this.X.GetHashCode(), this.Y.GetHashCode()); public override int GetHashCode() => HashCode.Combine(this.X, this.Y);
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"CieXyChromaticityCoordinates({this.X:#0.##}, {this.Y:#0.##})"); public override string ToString() => FormattableString.Invariant($"CieXyChromaticityCoordinates({this.X:#0.##}, {this.Y:#0.##})");

7
src/ImageSharp/ColorSpaces/CieXyy.cs

@ -83,12 +83,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
public static bool operator !=(CieXyy left, CieXyy right) => !left.Equals(right); public static bool operator !=(CieXyy left, CieXyy right) => !left.Equals(right);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.X, this.Y, this.Yl);
{
int hash = this.X.GetHashCode();
hash = HashHelpers.Combine(hash, this.Y.GetHashCode());
return HashHelpers.Combine(hash, this.Yl.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"CieXyy({this.X:#0.##}, {this.Y:#0.##}, {this.Yl:#0.##})"); public override string ToString() => FormattableString.Invariant($"CieXyy({this.X:#0.##}, {this.Y:#0.##}, {this.Yl:#0.##})");

7
src/ImageSharp/ColorSpaces/CieXyz.cs

@ -86,12 +86,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
public Vector3 ToVector3() => new Vector3(this.X, this.Y, this.Z); public Vector3 ToVector3() => new Vector3(this.X, this.Y, this.Z);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.X, this.Y, this.Z);
{
int hash = this.X.GetHashCode();
hash = HashHelpers.Combine(hash, this.Y.GetHashCode());
return HashHelpers.Combine(hash, this.Z.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"CieXyz({this.X:#0.##}, {this.Y:#0.##}, {this.Z:#0.##})"); public override string ToString() => FormattableString.Invariant($"CieXyz({this.X:#0.##}, {this.Y:#0.##}, {this.Z:#0.##})");

8
src/ImageSharp/ColorSpaces/Cmyk.cs

@ -90,13 +90,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <inheritdoc/> /// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.C, this.M, this.Y, this.K);
{
int hash = this.C.GetHashCode();
hash = HashHelpers.Combine(hash, this.M.GetHashCode());
hash = HashHelpers.Combine(hash, this.Y.GetHashCode());
return HashHelpers.Combine(hash, this.K.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"Cmyk({this.C:#0.##}, {this.M:#0.##}, {this.Y:#0.##}, {this.K:#0.##})"); public override string ToString() => FormattableString.Invariant($"Cmyk({this.C:#0.##}, {this.M:#0.##}, {this.Y:#0.##}, {this.K:#0.##})");

10
src/ImageSharp/ColorSpaces/Conversion/Implementation/RGBPrimariesChromaticityCoordinates.cs

@ -86,14 +86,6 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.R, this.G, this.B);
{
unchecked
{
int hashCode = this.R.GetHashCode();
hashCode = (hashCode * 397) ^ this.G.GetHashCode();
return (hashCode * 397) ^ this.B.GetHashCode();
}
}
} }
} }

10
src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/GammaWorkingSpace.cs

@ -1,6 +1,7 @@
// 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;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.ColorSpaces.Companding; using SixLabors.ImageSharp.ColorSpaces.Companding;
@ -57,10 +58,9 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(
{ this.WhitePoint,
int hash = base.GetHashCode(); this.ChromaticityCoordinates,
return HashHelpers.Combine(hash, this.Gamma.GetHashCode()); this.Gamma);
}
} }
} }

5
src/ImageSharp/ColorSpaces/Conversion/Implementation/WorkingSpaces/RgbWorkingSpaceBase.cs

@ -1,6 +1,8 @@
// 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.ColorSpaces.Conversion.Implementation namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation
{ {
/// <summary> /// <summary>
@ -76,8 +78,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion.Implementation
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
int hash = this.WhitePoint.GetHashCode(); return HashCode.Combine(this.WhitePoint, this.ChromaticityCoordinates);
return HashHelpers.Combine(hash, this.ChromaticityCoordinates.GetHashCode());
} }
} }
} }

7
src/ImageSharp/ColorSpaces/Hsl.cs

@ -84,12 +84,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <inheritdoc/> /// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.H, this.S, this.L);
{
int hash = this.H.GetHashCode();
hash = HashHelpers.Combine(hash, this.S.GetHashCode());
return HashHelpers.Combine(hash, this.L.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"Hsl({this.H:#0.##}, {this.S:#0.##}, {this.L:#0.##})"); public override string ToString() => FormattableString.Invariant($"Hsl({this.H:#0.##}, {this.S:#0.##}, {this.L:#0.##})");

7
src/ImageSharp/ColorSpaces/Hsv.cs

@ -82,12 +82,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <inheritdoc/> /// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.H, this.S, this.V);
{
int hash = this.H.GetHashCode();
hash = HashHelpers.Combine(hash, this.S.GetHashCode());
return HashHelpers.Combine(hash, this.V.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"Hsv({this.H:#0.##}, {this.S:#0.##}, {this.V:#0.##})"); public override string ToString() => FormattableString.Invariant($"Hsv({this.H:#0.##}, {this.S:#0.##}, {this.V:#0.##})");

5
src/ImageSharp/ColorSpaces/HunterLab.cs

@ -119,10 +119,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode()
{ {
int hash = this.L.GetHashCode(); return HashCode.Combine(this.L, this.A, this.B, this.WhitePoint);
hash = HashHelpers.Combine(hash, this.A.GetHashCode());
hash = HashHelpers.Combine(hash, this.B.GetHashCode());
return HashHelpers.Combine(hash, this.WhitePoint.GetHashCode());
} }
/// <inheritdoc/> /// <inheritdoc/>

7
src/ImageSharp/ColorSpaces/LinearRgb.cs

@ -126,12 +126,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <inheritdoc/> /// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.R, this.G, this.B);
{
int hash = this.R.GetHashCode();
hash = HashHelpers.Combine(hash, this.G.GetHashCode());
return HashHelpers.Combine(hash, this.B.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"LinearRgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})"); public override string ToString() => FormattableString.Invariant($"LinearRgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})");

7
src/ImageSharp/ColorSpaces/Lms.cs

@ -87,12 +87,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
public Vector3 ToVector3() => new Vector3(this.L, this.M, this.S); public Vector3 ToVector3() => new Vector3(this.L, this.M, this.S);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.L, this.M, this.S);
{
int hash = this.L.GetHashCode();
hash = HashHelpers.Combine(hash, this.M.GetHashCode());
return HashHelpers.Combine(hash, this.S.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"Lms({this.L:#0.##}, {this.M:#0.##}, {this.S:#0.##})"); public override string ToString() => FormattableString.Invariant($"Lms({this.L:#0.##}, {this.M:#0.##}, {this.S:#0.##})");

7
src/ImageSharp/ColorSpaces/Rgb.cs

@ -147,12 +147,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
public Vector3 ToVector3() => new Vector3(this.R, this.G, this.B); public Vector3 ToVector3() => new Vector3(this.R, this.G, this.B);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.R, this.G, this.B);
{
int hash = this.R.GetHashCode();
hash = HashHelpers.Combine(hash, this.G.GetHashCode());
return HashHelpers.Combine(hash, this.B.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"Rgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})"); public override string ToString() => FormattableString.Invariant($"Rgb({this.R:#0.##}, {this.G:#0.##}, {this.B:#0.##})");

7
src/ImageSharp/ColorSpaces/YCbCr.cs

@ -83,12 +83,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <inheritdoc/> /// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Y, this.Cb, this.Cr);
{
int hash = this.Y.GetHashCode();
hash = HashHelpers.Combine(hash, this.Cb.GetHashCode());
return HashHelpers.Combine(hash, this.Cr.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => FormattableString.Invariant($"YCbCr({this.Y}, {this.Cb}, {this.Cr})"); public override string ToString() => FormattableString.Invariant($"YCbCr({this.Y}, {this.Cb}, {this.Cr})");

4
src/ImageSharp/Common/ParallelUtils/ParallelHelper.cs

@ -85,7 +85,7 @@ namespace SixLabors.ImageSharp.ParallelUtils
Rectangle rectangle, Rectangle rectangle,
in ParallelExecutionSettings parallelSettings, in ParallelExecutionSettings parallelSettings,
Action<RowInterval, Memory<T>> body) Action<RowInterval, Memory<T>> body)
where T : struct where T : unmanaged
{ {
int maxSteps = DivideCeil(rectangle.Width * rectangle.Height, parallelSettings.MinimumPixelsProcessedPerTask); int maxSteps = DivideCeil(rectangle.Width * rectangle.Height, parallelSettings.MinimumPixelsProcessedPerTask);
@ -135,7 +135,7 @@ namespace SixLabors.ImageSharp.ParallelUtils
Rectangle rectangle, Rectangle rectangle,
Configuration configuration, Configuration configuration,
Action<RowInterval, Memory<T>> body) Action<RowInterval, Memory<T>> body)
where T : struct where T : unmanaged
{ {
IterateRowsWithTempBuffer(rectangle, configuration.GetParallelSettings(), body); IterateRowsWithTempBuffer(rectangle, configuration.GetParallelSettings(), body);
} }

12
src/ImageSharp/Formats/Jpeg/Components/Decoder/AdobeMarker.cs

@ -100,13 +100,11 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
return HashHelpers.Combine( return HashCode.Combine(
this.DCTEncodeVersion.GetHashCode(), this.DCTEncodeVersion,
HashHelpers.Combine( this.APP14Flags0,
this.APP14Flags0.GetHashCode(), this.APP14Flags1,
HashHelpers.Combine( this.ColorTransform);
this.APP14Flags1.GetHashCode(),
this.ColorTransform.GetHashCode())));
} }
} }
} }

13
src/ImageSharp/Formats/Jpeg/Components/Decoder/JFifMarker.cs

@ -112,13 +112,12 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
return HashHelpers.Combine( return HashCode.Combine(
this.MajorVersion.GetHashCode(), this.MajorVersion,
HashHelpers.Combine( this.MinorVersion,
this.MinorVersion.GetHashCode(), this.DensityUnits,
HashHelpers.Combine( this.XDensity,
this.DensityUnits.GetHashCode(), this.YDensity);
HashHelpers.Combine(this.XDensity, this.YDensity))));
} }
} }
} }

4
src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs

@ -553,12 +553,12 @@ namespace SixLabors.ImageSharp.Formats.Jpeg
if (this.exifData is null) if (this.exifData is null)
{ {
// The first 6 bytes (Exif00) will be skipped, because this is Jpeg specific // The first 6 bytes (Exif00) will be skipped, because this is Jpeg specific
this.exifData = profile.Skip(Exif00).ToArray(); this.exifData = profile.AsSpan(Exif00).ToArray();
} }
else else
{ {
// If the EXIF information exceeds 64K, it will be split over multiple APP1 markers // If the EXIF information exceeds 64K, it will be split over multiple APP1 markers
this.ExtendProfile(ref this.exifData, profile.Skip(Exif00).ToArray()); this.ExtendProfile(ref this.exifData, profile.AsSpan(Exif00).ToArray());
} }
} }
} }

2
src/ImageSharp/Formats/Png/PngEncoderCore.cs

@ -237,7 +237,7 @@ namespace SixLabors.ImageSharp.Formats.Png
} }
// Use the metadata to determine what quantization depth to use if no quantizer has been set. // Use the metadata to determine what quantization depth to use if no quantizer has been set.
if (this.quantizer == null) if (this.quantizer is null)
{ {
this.quantizer = new WuQuantizer(ImageMaths.GetColorCountForBitDepth(bits)); this.quantizer = new WuQuantizer(ImageMaths.GetColorCountForBitDepth(bits));
} }

22
src/ImageSharp/ImageSharp.csproj

@ -1,10 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<Description>A cross-platform library for the processing of image files; written in C#</Description>
<AssemblyTitle>SixLabors.ImageSharp</AssemblyTitle> <AssemblyTitle>SixLabors.ImageSharp</AssemblyTitle>
<Authors>Six Labors and contributors</Authors>
<Company>Six Labors</Company>
<Copyright>Copyright (c) Six Labors and contributors.</Copyright>
<Product>SixLabors.ImageSharp</Product>
<Description>A cross-platform library for the processing of image files; written in C#</Description>
<NeutralLanguage>en</NeutralLanguage>
<VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix> <VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix>
<VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix> <VersionPrefix Condition="$(packageversion) == ''">0.0.1</VersionPrefix>
<Authors>Six Labors and contributors</Authors>
<TargetFrameworks>netstandard1.3;netstandard2.0;netcoreapp2.1;net472</TargetFrameworks> <TargetFrameworks>netstandard1.3;netstandard2.0;netcoreapp2.1;net472</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
@ -16,20 +21,11 @@
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl> <PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/SixLabors/ImageSharp</RepositoryUrl> <RepositoryUrl>https://github.com/SixLabors/ImageSharp</RepositoryUrl>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<DebugType Condition="$(codecov) != ''">full</DebugType> <DebugType Condition="$(codecov) != ''">full</DebugType>
<DebugType Condition="$(codecov) == ''">portable</DebugType> <DebugType Condition="$(codecov) == ''">portable</DebugType>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<Features>IOperation</Features> <Features>IOperation</Features>
<LangVersion>Latest</LangVersion> <LangVersion>7.3</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' OR '$(TargetFramework)' == 'net472' "> <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' OR '$(TargetFramework)' == 'net472' ">
@ -42,7 +38,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.1" /> <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.1" />
<PackageReference Include="SixLabors.Core" Version="1.0.0-dev000089" /> <PackageReference Include="SixLabors.Core" Version="1.0.0-dev000094" />
<AdditionalFiles Include="..\..\stylecop.json" /> <AdditionalFiles Include="..\..\stylecop.json" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta007"> <PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta007">
<PrivateAssets>All</PrivateAssets> <PrivateAssets>All</PrivateAssets>

14
src/ImageSharp/MetaData/ImageProperty.cs

@ -99,19 +99,7 @@ namespace SixLabors.ImageSharp.MetaData
/// <returns> /// <returns>
/// A 32-bit signed integer that is the hash code for this instance. /// A 32-bit signed integer that is the hash code for this instance.
/// </returns> /// </returns>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Name, this.Value);
{
unchecked
{
int hashCode = this.Name.GetHashCode();
if (this.Value != null)
{
hashCode = (hashCode * 397) ^ this.Value.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// Returns the fully qualified type name of this instance. /// Returns the fully qualified type name of this instance.

6
src/ImageSharp/MetaData/Profiles/Exif/ExifReader.cs

@ -27,9 +27,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
public ExifReader(byte[] exifData) public ExifReader(byte[] exifData)
{ {
DebugGuard.NotNull(exifData, nameof(exifData)); this.exifData = exifData ?? throw new ArgumentNullException(nameof(exifData));
this.exifData = exifData;
} }
private delegate TDataType ConverterMethod<TDataType>(ReadOnlySpan<byte> data); private delegate TDataType ConverterMethod<TDataType>(ReadOnlySpan<byte> data);
@ -374,7 +372,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
private void AddInvalidTag(ExifTag tag) private void AddInvalidTag(ExifTag tag)
{ {
if (this.invalidTags == null) if (this.invalidTags is null)
{ {
this.invalidTags = new List<ExifTag>(); this.invalidTags = new List<ExifTag>();
} }

20
src/ImageSharp/MetaData/Profiles/Exif/ExifValue.cs

@ -198,7 +198,10 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() => this.GetHashCode(this); public override int GetHashCode()
{
return HashCode.Combine(this.Tag, this.DataType, this.Value);
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString()
@ -714,20 +717,5 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Exif
throw new NotSupportedException(); throw new NotSupportedException();
} }
} }
/// <summary>
/// Returns the hash code for this instance.
/// </summary>
/// <param name="exif">
/// The instance of <see cref="ExifValue"/> to return the hash code for.
/// </param>
/// <returns>
/// A 32-bit signed integer that is the hash code for this instance.
/// </returns>
private int GetHashCode(ExifValue exif)
{
int hashCode = exif.Tag.GetHashCode() ^ exif.DataType.GetHashCode();
return hashCode ^ exif.Value?.GetHashCode() ?? hashCode;
}
} }
} }

21
src/ImageSharp/MetaData/Profiles/ICC/Curves/IccParametricCurve.cs

@ -154,18 +154,15 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Type,
int hashCode = (int)this.Type; this.G.GetHashCode(),
hashCode = (hashCode * 397) ^ this.G.GetHashCode(); this.A.GetHashCode(),
hashCode = (hashCode * 397) ^ this.A.GetHashCode(); this.B.GetHashCode(),
hashCode = (hashCode * 397) ^ this.B.GetHashCode(); this.C.GetHashCode(),
hashCode = (hashCode * 397) ^ this.C.GetHashCode(); this.D.GetHashCode(),
hashCode = (hashCode * 397) ^ this.D.GetHashCode(); this.E.GetHashCode(),
hashCode = (hashCode * 397) ^ this.E.GetHashCode(); this.F.GetHashCode());
hashCode = (hashCode * 397) ^ this.F.GetHashCode();
return hashCode;
}
} }
} }
} }

11
src/ImageSharp/MetaData/Profiles/ICC/Curves/IccResponseCurve.cs

@ -73,13 +73,10 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.CurveType,
int hashCode = (int)this.CurveType; this.XyzValues,
hashCode = (hashCode * 397) ^ (this.XyzValues?.GetHashCode() ?? 0); this.ResponseArrays);
hashCode = (hashCode * 397) ^ (this.ResponseArrays?.GetHashCode() ?? 0);
return hashCode;
}
} }
private bool EqualsResponseArray(IccResponseCurve other) private bool EqualsResponseArray(IccResponseCurve other)

8
src/ImageSharp/MetaData/Profiles/ICC/IccTagDataEntry.cs

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => this.Signature.GetHashCode();
{
unchecked
{
return (int)this.Signature * 397;
}
}
} }
} }

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

@ -110,13 +110,10 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.ColorantType,
hashCode = (hashCode * 397) ^ (int)this.ColorantType; this.ChannelValues);
hashCode = (hashCode * 397) ^ (this.ChannelValues?.GetHashCode() ?? 0);
return hashCode;
}
} }
private static double[][] GetColorantArray(IccColorantEncoding colorantType) private static double[][] GetColorantArray(IccColorantEncoding colorantType)

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

@ -70,10 +70,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(this.Signature, this.ColorantNumber);
{
return (base.GetHashCode() * 397) ^ (this.ColorantNumber?.GetHashCode() ?? 0);
}
} }
} }
} }

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

@ -72,10 +72,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(this.Signature, this.ColorantData);
{
return (base.GetHashCode() * 397) ^ (this.ColorantData?.GetHashCode() ?? 0);
}
} }
} }
} }

17
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccCrdInfoTagDataEntry.cs

@ -121,16 +121,13 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.PostScriptProductName,
hashCode = (hashCode * 397) ^ (this.PostScriptProductName?.GetHashCode() ?? 0); this.RenderingIntent0Crd,
hashCode = (hashCode * 397) ^ (this.RenderingIntent0Crd?.GetHashCode() ?? 0); this.RenderingIntent1Crd,
hashCode = (hashCode * 397) ^ (this.RenderingIntent1Crd?.GetHashCode() ?? 0); this.RenderingIntent2Crd,
hashCode = (hashCode * 397) ^ (this.RenderingIntent2Crd?.GetHashCode() ?? 0); this.RenderingIntent3Crd);
hashCode = (hashCode * 397) ^ (this.RenderingIntent3Crd?.GetHashCode() ?? 0);
return hashCode;
}
} }
} }
} }

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

@ -116,12 +116,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.CurveData);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.CurveData?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -91,13 +91,10 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.Data,
hashCode = (hashCode * 397) ^ (this.Data?.GetHashCode() ?? 0); this.IsAscii);
hashCode = (hashCode * 397) ^ this.IsAscii.GetHashCode();
return hashCode;
}
} }
} }
} }

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

@ -66,10 +66,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(this.Signature, this.Value);
{
return (base.GetHashCode() * 397) ^ this.Value.GetHashCode();
}
} }
} }
} }

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

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -62,17 +62,14 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
: base(IccTypeSignature.Lut16, tagSignature) : base(IccTypeSignature.Lut16, tagSignature)
{ {
Guard.NotNull(matrix, nameof(matrix)); Guard.NotNull(matrix, nameof(matrix));
Guard.NotNull(inputValues, nameof(inputValues));
Guard.NotNull(clutValues, nameof(clutValues));
Guard.NotNull(outputValues, nameof(outputValues));
bool is3By3 = matrix.GetLength(0) == 3 && matrix.GetLength(1) == 3; bool is3By3 = matrix.GetLength(0) == 3 && matrix.GetLength(1) == 3;
Guard.IsTrue(is3By3, nameof(matrix), "Matrix must have a size of three by three"); Guard.IsTrue(is3By3, nameof(matrix), "Matrix must have a size of three by three");
this.Matrix = this.CreateMatrix(matrix); this.Matrix = this.CreateMatrix(matrix);
this.InputValues = inputValues; this.InputValues = inputValues ?? throw new ArgumentNullException(nameof(inputValues));
this.ClutValues = clutValues; this.ClutValues = clutValues ?? throw new ArgumentNullException(nameof(clutValues));
this.OutputValues = outputValues; this.OutputValues = outputValues ?? throw new ArgumentNullException(nameof(outputValues));
Guard.IsTrue(this.InputChannelCount == clutValues.InputChannelCount, nameof(clutValues), "Input channel count does not match the CLUT size"); Guard.IsTrue(this.InputChannelCount == clutValues.InputChannelCount, nameof(clutValues), "Input channel count does not match the CLUT size");
Guard.IsTrue(this.OutputChannelCount == clutValues.OutputChannelCount, nameof(clutValues), "Output channel count does not match the CLUT size"); Guard.IsTrue(this.OutputChannelCount == clutValues.OutputChannelCount, nameof(clutValues), "Output channel count does not match the CLUT size");
@ -143,15 +140,12 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.Matrix,
hashCode = (hashCode * 397) ^ this.Matrix.GetHashCode(); this.InputValues,
hashCode = (hashCode * 397) ^ (this.InputValues?.GetHashCode() ?? 0); this.ClutValues,
hashCode = (hashCode * 397) ^ (this.ClutValues?.GetHashCode() ?? 0); this.OutputValues);
hashCode = (hashCode * 397) ^ (this.OutputValues?.GetHashCode() ?? 0);
return hashCode;
}
} }
private Matrix4x4 CreateMatrix(float[,] matrix) private Matrix4x4 CreateMatrix(float[,] matrix)

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

@ -62,17 +62,14 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
: base(IccTypeSignature.Lut8, tagSignature) : base(IccTypeSignature.Lut8, tagSignature)
{ {
Guard.NotNull(matrix, nameof(matrix)); Guard.NotNull(matrix, nameof(matrix));
Guard.NotNull(inputValues, nameof(inputValues));
Guard.NotNull(clutValues, nameof(clutValues));
Guard.NotNull(outputValues, nameof(outputValues));
bool is3By3 = matrix.GetLength(0) == 3 && matrix.GetLength(1) == 3; bool is3By3 = matrix.GetLength(0) == 3 && matrix.GetLength(1) == 3;
Guard.IsTrue(is3By3, nameof(matrix), "Matrix must have a size of three by three"); Guard.IsTrue(is3By3, nameof(matrix), "Matrix must have a size of three by three");
this.Matrix = this.CreateMatrix(matrix); this.Matrix = this.CreateMatrix(matrix);
this.InputValues = inputValues; this.InputValues = inputValues ?? throw new ArgumentNullException(nameof(inputValues));
this.ClutValues = clutValues; this.ClutValues = clutValues ?? throw new ArgumentNullException(nameof(clutValues));
this.OutputValues = outputValues; this.OutputValues = outputValues ?? throw new ArgumentNullException(nameof(outputValues));
Guard.IsTrue(this.InputChannelCount == clutValues.InputChannelCount, nameof(clutValues), "Input channel count does not match the CLUT size"); Guard.IsTrue(this.InputChannelCount == clutValues.InputChannelCount, nameof(clutValues), "Input channel count does not match the CLUT size");
Guard.IsTrue(this.OutputChannelCount == clutValues.OutputChannelCount, nameof(clutValues), "Output channel count does not match the CLUT size"); Guard.IsTrue(this.OutputChannelCount == clutValues.OutputChannelCount, nameof(clutValues), "Output channel count does not match the CLUT size");
@ -146,15 +143,12 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.Matrix,
hashCode = (hashCode * 397) ^ this.Matrix.GetHashCode(); this.InputValues,
hashCode = (hashCode * 397) ^ (this.InputValues?.GetHashCode() ?? 0); this.ClutValues,
hashCode = (hashCode * 397) ^ (this.ClutValues?.GetHashCode() ?? 0); this.OutputValues);
hashCode = (hashCode * 397) ^ (this.OutputValues?.GetHashCode() ?? 0);
return hashCode;
}
} }
private Matrix4x4 CreateMatrix(float[,] matrix) private Matrix4x4 CreateMatrix(float[,] matrix)

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

@ -183,19 +183,21 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked #pragma warning disable SA1129 // Do not use default value type constructor
{ var hashCode = new HashCode();
int hashCode = base.GetHashCode(); #pragma warning restore SA1129 // Do not use default value type constructor
hashCode = (hashCode * 397) ^ this.InputChannelCount;
hashCode = (hashCode * 397) ^ this.OutputChannelCount; hashCode.Add(this.Signature);
hashCode = (hashCode * 397) ^ this.Matrix3x3.GetHashCode(); hashCode.Add(this.InputChannelCount);
hashCode = (hashCode * 397) ^ this.Matrix3x1.GetHashCode(); hashCode.Add(this.OutputChannelCount);
hashCode = (hashCode * 397) ^ (this.ClutValues?.GetHashCode() ?? 0); hashCode.Add(this.Matrix3x3);
hashCode = (hashCode * 397) ^ (this.CurveB?.GetHashCode() ?? 0); hashCode.Add(this.Matrix3x1);
hashCode = (hashCode * 397) ^ (this.CurveM?.GetHashCode() ?? 0); hashCode.Add(this.ClutValues);
hashCode = (hashCode * 397) ^ (this.CurveA?.GetHashCode() ?? 0); hashCode.Add(this.CurveB);
return hashCode; hashCode.Add(this.CurveM);
} hashCode.Add(this.CurveA);
return hashCode.ToHashCode();
} }
private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves) private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves)

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

@ -183,19 +183,21 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked #pragma warning disable SA1129 // Do not use default value type constructor
{ var hashCode = new HashCode();
int hashCode = base.GetHashCode(); #pragma warning restore SA1129 // Do not use default value type constructor
hashCode = (hashCode * 397) ^ this.InputChannelCount;
hashCode = (hashCode * 397) ^ this.OutputChannelCount; hashCode.Add(this.Signature);
hashCode = (hashCode * 397) ^ this.Matrix3x3.GetHashCode(); hashCode.Add(this.InputChannelCount);
hashCode = (hashCode * 397) ^ this.Matrix3x1.GetHashCode(); hashCode.Add(this.OutputChannelCount);
hashCode = (hashCode * 397) ^ (this.ClutValues?.GetHashCode() ?? 0); hashCode.Add(this.Matrix3x3);
hashCode = (hashCode * 397) ^ (this.CurveB?.GetHashCode() ?? 0); hashCode.Add(this.Matrix3x1);
hashCode = (hashCode * 397) ^ (this.CurveM?.GetHashCode() ?? 0); hashCode.Add(this.ClutValues);
hashCode = (hashCode * 397) ^ (this.CurveA?.GetHashCode() ?? 0); hashCode.Add(this.CurveB);
return hashCode; hashCode.Add(this.CurveM);
} hashCode.Add(this.CurveA);
return hashCode.ToHashCode();
} }
private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves) private bool EqualsCurve(IccTagDataEntry[] thisCurves, IccTagDataEntry[] entryCurves)

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

@ -106,16 +106,13 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.Observer,
hashCode = (hashCode * 397) ^ (int)this.Observer; this.XyzBacking,
hashCode = (hashCode * 397) ^ this.XyzBacking.GetHashCode(); this.Geometry,
hashCode = (hashCode * 397) ^ (int)this.Geometry; this.Flare,
hashCode = (hashCode * 397) ^ this.Flare.GetHashCode(); this.Illuminant);
hashCode = (hashCode * 397) ^ (int)this.Illuminant;
return hashCode;
}
} }
} }
} }

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

@ -66,12 +66,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Texts);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Texts?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -90,14 +90,11 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.InputChannelCount,
hashCode = (hashCode * 397) ^ this.InputChannelCount; this.OutputChannelCount,
hashCode = (hashCode * 397) ^ this.OutputChannelCount; this.Data);
hashCode = (hashCode * 397) ^ (this.Data?.GetHashCode() ?? 0);
return hashCode;
}
} }
} }
} }

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

@ -83,6 +83,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
if (colors.Length > 0) if (colors.Length > 0)
{ {
coordinateCount = colors[0].DeviceCoordinates?.Length ?? 0; coordinateCount = colors[0].DeviceCoordinates?.Length ?? 0;
Guard.IsFalse(colors.Any(t => (t.DeviceCoordinates?.Length ?? 0) != coordinateCount), nameof(colors), "Device coordinate count must be the same for all colors"); Guard.IsFalse(colors.Any(t => (t.DeviceCoordinates?.Length ?? 0) != coordinateCount), nameof(colors), "Device coordinate count must be the same for all colors");
} }
@ -154,16 +155,13 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.CoordinateCount,
hashCode = (hashCode * 397) ^ this.CoordinateCount; this.Prefix,
hashCode = (hashCode * 397) ^ (this.Prefix?.GetHashCode() ?? 0); this.Suffix,
hashCode = (hashCode * 397) ^ (this.Suffix?.GetHashCode() ?? 0); this.VendorFlags,
hashCode = (hashCode * 397) ^ this.VendorFlags; this.Colors);
hashCode = (hashCode * 397) ^ (this.Colors?.GetHashCode() ?? 0);
return hashCode;
}
} }
} }
} }

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

@ -28,7 +28,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
public IccParametricCurveTagDataEntry(IccParametricCurve curve, IccProfileTag tagSignature) public IccParametricCurveTagDataEntry(IccParametricCurve curve, IccProfileTag tagSignature)
: base(IccTypeSignature.ParametricCurve, tagSignature) : base(IccTypeSignature.ParametricCurve, tagSignature)
{ {
this.Curve = curve; this.Curve = curve ?? throw new ArgumentNullException(nameof(curve));
} }
/// <summary> /// <summary>
@ -65,12 +65,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Curve);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Curve?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -67,12 +67,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Descriptions);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Descriptions?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -65,12 +65,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -83,13 +83,10 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.ChannelCount,
hashCode = (hashCode * 397) ^ this.ChannelCount.GetHashCode(); this.Curves);
hashCode = (hashCode * 397) ^ (this.Curves?.GetHashCode() ?? 0);
return hashCode;
}
} }
} }
} }

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

@ -77,13 +77,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(this.Signature, this.Flags, this.Channels);
{
int hashCode = base.GetHashCode();
hashCode = (hashCode * 397) ^ (int)this.Flags;
hashCode = (hashCode * 397) ^ (this.Channels?.GetHashCode() ?? 0);
return hashCode;
}
} }
} }
} }

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

@ -65,12 +65,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.SignatureData);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.SignatureData?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -166,16 +166,13 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.Ascii,
hashCode = (hashCode * 397) ^ (this.Ascii?.GetHashCode() ?? 0); this.Unicode,
hashCode = (hashCode * 397) ^ (this.Unicode?.GetHashCode() ?? 0); this.ScriptCode,
hashCode = (hashCode * 397) ^ (this.ScriptCode?.GetHashCode() ?? 0); this.UnicodeLanguageCode,
hashCode = (hashCode * 397) ^ (int)this.UnicodeLanguageCode; this.ScriptCodeCode);
hashCode = (hashCode * 397) ^ this.ScriptCodeCode.GetHashCode();
return hashCode;
}
} }
} }
} }

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

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Text);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Text?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -65,12 +65,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

13
src/ImageSharp/MetaData/Profiles/ICC/TagDataEntries/IccUcrBgTagDataEntry.cs

@ -86,14 +86,11 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.UcrCurve,
hashCode = (hashCode * 397) ^ (this.UcrCurve?.GetHashCode() ?? 0); this.BgCurve,
hashCode = (hashCode * 397) ^ (this.BgCurve?.GetHashCode() ?? 0); this.Description);
hashCode = (hashCode * 397) ^ (this.Description?.GetHashCode() ?? 0);
return hashCode;
}
} }
} }
} }

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

@ -64,12 +64,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Signature, this.Data);
{
unchecked
{
return (base.GetHashCode() * 397) ^ (this.Data?.GetHashCode() ?? 0);
}
}
} }
} }

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

@ -86,14 +86,11 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Signature,
int hashCode = base.GetHashCode(); this.IlluminantXyz,
hashCode = (hashCode * 397) ^ this.IlluminantXyz.GetHashCode(); this.SurroundXyz,
hashCode = (hashCode * 397) ^ this.SurroundXyz.GetHashCode(); this.Illuminant);
hashCode = (hashCode * 397) ^ (int)this.Illuminant;
return hashCode;
}
} }
} }
} }

15
src/ImageSharp/MetaData/Profiles/ICC/Various/IccClut.cs

@ -142,15 +142,12 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Values,
int hashCode = this.Values?.GetHashCode() ?? 0; this.DataType,
hashCode = (hashCode * 397) ^ (int)this.DataType; this.InputChannelCount,
hashCode = (hashCode * 397) ^ this.InputChannelCount; this.OutputChannelCount,
hashCode = (hashCode * 397) ^ this.OutputChannelCount; this.GridPointCount);
hashCode = (hashCode * 397) ^ (this.GridPointCount?.GetHashCode() ?? 0);
return hashCode;
}
} }
private bool EqualsValuesArray(IccClut other) private bool EqualsValuesArray(IccClut other)

13
src/ImageSharp/MetaData/Profiles/ICC/Various/IccColorantTableEntry.cs

@ -102,14 +102,11 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Name,
int hashCode = this.Name.GetHashCode(); this.Pcs1,
hashCode = (hashCode * 397) ^ this.Pcs1.GetHashCode(); this.Pcs2,
hashCode = (hashCode * 397) ^ this.Pcs2.GetHashCode(); this.Pcs3);
hashCode = (hashCode * 397) ^ this.Pcs3.GetHashCode();
return hashCode;
}
} }
/// <inheritdoc/> /// <inheritdoc/>

26
src/ImageSharp/MetaData/Profiles/ICC/Various/IccNamedColor.cs

@ -80,27 +80,23 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc/> /// <inheritdoc/>
public bool Equals(IccNamedColor other) => public bool Equals(IccNamedColor other)
this.Name == other.Name && {
this.PcsCoordinates.SequenceEqual(other.PcsCoordinates) && return this.Name.Equals(other.Name)
this.DeviceCoordinates.SequenceEqual(other.DeviceCoordinates); && this.PcsCoordinates.SequenceEqual(other.PcsCoordinates)
&& this.DeviceCoordinates.SequenceEqual(other.DeviceCoordinates);
}
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Name,
int hashCode = this.Name.GetHashCode(); this.PcsCoordinates,
hashCode = (hashCode * 397) ^ this.PcsCoordinates.GetHashCode(); this.DeviceCoordinates);
hashCode = (hashCode * 397) ^ this.DeviceCoordinates.GetHashCode();
return hashCode;
}
} }
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString() => this.Name;
{
return this.Name;
}
} }
} }

10
src/ImageSharp/MetaData/Profiles/ICC/Various/IccPositionNumber.cs

@ -73,15 +73,9 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
this.Size == other.Size; this.Size == other.Size;
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => unchecked((int)(this.Offset ^ this.Size));
{
return unchecked((int)(this.Offset ^ this.Size));
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString() => $"{this.Offset}; {this.Size}";
{
return $"{this.Offset}; {this.Size}";
}
} }
} }

24
src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileDescription.cs

@ -28,15 +28,12 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
IccLocalizedString[] deviceManufacturerInfo, IccLocalizedString[] deviceManufacturerInfo,
IccLocalizedString[] deviceModelInfo) IccLocalizedString[] deviceModelInfo)
{ {
Guard.NotNull(deviceManufacturerInfo, nameof(deviceManufacturerInfo));
Guard.NotNull(deviceModelInfo, nameof(deviceModelInfo));
this.DeviceManufacturer = deviceManufacturer; this.DeviceManufacturer = deviceManufacturer;
this.DeviceModel = deviceModel; this.DeviceModel = deviceModel;
this.DeviceAttributes = deviceAttributes; this.DeviceAttributes = deviceAttributes;
this.TechnologyInformation = technologyInformation; this.TechnologyInformation = technologyInformation;
this.DeviceManufacturerInfo = deviceManufacturerInfo; this.DeviceManufacturerInfo = deviceManufacturerInfo ?? throw new ArgumentNullException(nameof(deviceManufacturerInfo));
this.DeviceModelInfo = deviceModelInfo; this.DeviceModelInfo = deviceModelInfo ?? throw new ArgumentNullException(nameof(deviceModelInfo));
} }
/// <summary> /// <summary>
@ -87,16 +84,13 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.DeviceManufacturer,
int hashCode = (int)this.DeviceManufacturer; this.DeviceModel,
hashCode = (hashCode * 397) ^ (int)this.DeviceModel; this.DeviceAttributes,
hashCode = (hashCode * 397) ^ this.DeviceAttributes.GetHashCode(); this.TechnologyInformation,
hashCode = (hashCode * 397) ^ (int)this.TechnologyInformation; this.DeviceManufacturerInfo,
hashCode = (hashCode * 397) ^ (this.DeviceManufacturerInfo?.GetHashCode() ?? 0); this.DeviceModelInfo);
hashCode = (hashCode * 397) ^ (this.DeviceModelInfo?.GetHashCode() ?? 0);
return hashCode;
}
} }
} }
} }

13
src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileId.cs

@ -101,14 +101,11 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(
{ this.Part1,
int hashCode = this.Part1.GetHashCode(); this.Part2,
hashCode = (hashCode * 397) ^ this.Part2.GetHashCode(); this.Part3,
hashCode = (hashCode * 397) ^ this.Part3.GetHashCode(); this.Part4);
hashCode = (hashCode * 397) ^ this.Part4.GetHashCode();
return hashCode;
}
} }
/// <inheritdoc/> /// <inheritdoc/>

12
src/ImageSharp/MetaData/Profiles/ICC/Various/IccProfileSequenceIdentifier.cs

@ -18,10 +18,8 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <param name="description">Description of the profile</param> /// <param name="description">Description of the profile</param>
public IccProfileSequenceIdentifier(IccProfileId id, IccLocalizedString[] description) public IccProfileSequenceIdentifier(IccProfileId id, IccLocalizedString[] description)
{ {
Guard.NotNull(description, nameof(description));
this.Id = id; this.Id = id;
this.Description = description; this.Description = description ?? throw new ArgumentNullException(nameof(description));
} }
/// <summary> /// <summary>
@ -46,12 +44,6 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
} }
/// <inheritdoc /> /// <inheritdoc />
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Id, this.Description);
{
unchecked
{
return (this.Id.GetHashCode() * 397) ^ (this.Description?.GetHashCode() ?? 0);
}
}
} }
} }

15
src/ImageSharp/MetaData/Profiles/ICC/Various/IccResponseNumber.cs

@ -73,20 +73,9 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
this.MeasurementValue == other.MeasurementValue; this.MeasurementValue == other.MeasurementValue;
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.DeviceCode, this.MeasurementValue);
{
unchecked
{
int hashCode = this.DeviceCode.GetHashCode();
hashCode = (hashCode * 397) ^ this.MeasurementValue.GetHashCode();
return hashCode;
}
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() public override string ToString() => $"Code: {this.DeviceCode}; Value: {this.MeasurementValue}";
{
return $"Code: {this.DeviceCode}; Value: {this.MeasurementValue}";
}
} }
} }

8
src/ImageSharp/MetaData/Profiles/ICC/Various/IccScreeningChannel.cs

@ -85,13 +85,7 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(this.Frequency, this.Angle, this.SpotShape);
{
int hashCode = this.Frequency.GetHashCode();
hashCode = (hashCode * 397) ^ this.Angle.GetHashCode();
hashCode = (hashCode * 397) ^ (int)this.SpotShape;
return hashCode;
}
} }
/// <inheritdoc/> /// <inheritdoc/>

14
src/ImageSharp/MetaData/Profiles/ICC/Various/IccTagTableEntry.cs

@ -76,20 +76,14 @@ namespace SixLabors.ImageSharp.MetaData.Profiles.Icc
/// <inheritdoc/> /// <inheritdoc/>
public bool Equals(IccTagTableEntry other) => public bool Equals(IccTagTableEntry other) =>
this.Signature == other.Signature && this.Signature.Equals(other.Signature) &&
this.Offset == other.Offset && this.Offset.Equals(other.Offset) &&
this.DataSize == other.DataSize; this.DataSize.Equals(other.DataSize);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode()
{ {
unchecked return HashCode.Combine(this.Signature, this.Offset, this.DataSize);
{
int hashCode = this.Signature.GetHashCode();
hashCode = (hashCode * 397) ^ this.Offset.GetHashCode();
hashCode = (hashCode * 397) ^ this.DataSize.GetHashCode();
return hashCode;
}
} }
/// <inheritdoc/> /// <inheritdoc/>

7
src/ImageSharp/PixelFormats/PixelImplementations/Bgr24.cs

@ -1,6 +1,7 @@
// 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;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -189,10 +190,6 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <inheritdoc/> /// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.R, this.B, this.G);
{
int hash = HashHelpers.Combine(this.R.GetHashCode(), this.G.GetHashCode());
return HashHelpers.Combine(hash, this.B.GetHashCode());
}
} }
} }

7
src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs

@ -1,6 +1,7 @@
// 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;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -200,11 +201,7 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <inheritdoc/> /// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.R, this.B, this.G);
{
int hash = HashHelpers.Combine(this.R.GetHashCode(), this.G.GetHashCode());
return HashHelpers.Combine(hash, this.B.GetHashCode());
}
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => $"Rgb24({this.R}, {this.G}, {this.B})"; public override string ToString() => $"Rgb24({this.R}, {this.G}, {this.B})";

7
src/ImageSharp/PixelFormats/PixelImplementations/Rgb48.cs

@ -189,11 +189,6 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <inheritdoc /> /// <inheritdoc />
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.R, this.G, this.B);
{
return HashHelpers.Combine(
this.R.GetHashCode(),
HashHelpers.Combine(this.G.GetHashCode(), this.B.GetHashCode()));
}
} }
} }

7
src/ImageSharp/PixelFormats/PixelImplementations/RgbaVector.cs

@ -197,11 +197,6 @@ namespace SixLabors.ImageSharp.PixelFormats
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.R, this.G, this.B, this.A);
{
int hash = HashHelpers.Combine(this.R.GetHashCode(), this.G.GetHashCode());
hash = HashHelpers.Combine(hash, this.B.GetHashCode());
return HashHelpers.Combine(hash, this.A.GetHashCode());
}
} }
} }

7
src/ImageSharp/Primitives/ValueSize.cs

@ -133,9 +133,6 @@ namespace SixLabors.ImageSharp.Primitives
} }
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.Value, this.Type);
{
return HashHelpers.Combine(this.Value.GetHashCode(), this.Type.GetHashCode());
}
} }
} }

2
src/ImageSharp/Processing/Processors/Dithering/PaletteDitherProcessorBase.cs

@ -95,7 +95,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
base.BeforeFrameApply(source, sourceRectangle, configuration); base.BeforeFrameApply(source, sourceRectangle, configuration);
// Lazy init paletteVector: // Lazy init paletteVector:
if (this.paletteVector == null) if (this.paletteVector is null)
{ {
this.paletteVector = new Vector4[this.Palette.Length]; this.paletteVector = new Vector4[this.Palette.Length];
PixelOperations<TPixel>.Instance.ToScaledVector4(configuration, this.Palette, this.paletteVector); PixelOperations<TPixel>.Instance.ToScaledVector4(configuration, this.Palette, this.paletteVector);

3
src/ImageSharp/Processing/Processors/Dithering/PixelPair.cs

@ -43,7 +43,6 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering
=> obj is PixelPair<TPixel> other && this.First.Equals(other.First) && this.Second.Equals(other.Second); => obj is PixelPair<TPixel> other && this.First.Equals(other.First) && this.Second.Equals(other.Second);
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() public override int GetHashCode() => HashCode.Combine(this.First, this.Second);
=> HashHelpers.Combine(this.First.GetHashCode(), this.Second.GetHashCode());
} }
} }

26
src/Shared/AssemblyInfo.Common.cs

@ -5,32 +5,6 @@ using System.Reflection;
using System.Resources; using System.Resources;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyDescription("A cross-platform library for processing of image files; written in C#")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Six Labors")]
[assembly: AssemblyProduct("SixLabors.ImageSharp")]
[assembly: AssemblyCopyright("Copyright (c) Six Labors and contributors.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
// Ensure the internals can be built and tested. // Ensure the internals can be built and tested.
[assembly: InternalsVisibleTo("SixLabors.ImageSharp.Drawing")] [assembly: InternalsVisibleTo("SixLabors.ImageSharp.Drawing")]
[assembly: InternalsVisibleTo("ImageSharp.Benchmarks")] [assembly: InternalsVisibleTo("ImageSharp.Benchmarks")]

1
tests/ImageSharp.Benchmarks/General/BasicMath/ModuloPowerOfTwoConstant.cs

@ -1,5 +1,4 @@
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath
{ {

1
tests/ImageSharp.Benchmarks/General/BasicMath/ModuloPowerOfTwoVariable.cs

@ -1,5 +1,4 @@
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath namespace SixLabors.ImageSharp.Benchmarks.General.BasicMath
{ {

1
tests/ImageSharp.Benchmarks/General/PixelConversion/PixelConversion_Rgba32_To_Bgra32.cs

@ -4,7 +4,6 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Tuples; using SixLabors.ImageSharp.Tuples;

2
tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj

@ -16,7 +16,7 @@
<Compile Include="..\ImageSharp.Tests\TestUtilities\TestEnvironment.cs" Link="Tests\TestEnvironment.cs" /> <Compile Include="..\ImageSharp.Tests\TestUtilities\TestEnvironment.cs" Link="Tests\TestEnvironment.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.10.14" /> <PackageReference Include="BenchmarkDotNet" Version="0.11.3" />
<PackageReference Include="Colourful" Version="2.0.0" /> <PackageReference Include="Colourful" Version="2.0.0" />
<PackageReference Include="SixLabors.Shapes.Text" Version="1.0.0-beta0007" /> <PackageReference Include="SixLabors.Shapes.Text" Version="1.0.0-beta0007" />
<PackageReference Include="System.Drawing.Common" Version="4.5.0" /> <PackageReference Include="System.Drawing.Common" Version="4.5.0" />

8
tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj

@ -18,19 +18,13 @@
<ProjectReference Include="..\..\src\ImageSharp\ImageSharp.csproj" /> <ProjectReference Include="..\..\src\ImageSharp\ImageSharp.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="BitMiracle.LibJpeg.NET" Version="1.4.280" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="7.9.0.1" /> <PackageReference Include="Magick.NET-Q16-AnyCPU" Version="7.9.0.1" />
<PackageReference Include="xunit" Version="2.3.1" /> <PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="Moq" Version="4.8.3" /> <PackageReference Include="Moq" Version="4.10.0" />
<!--<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />-->
<!--<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />-->
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\ImageSharp.Tests\**\*.cs" Exclude="bin\**;obj\**" Link="Tests\%(RecursiveDir)%(Filename)%(Extension)" /> <Compile Include="..\ImageSharp.Tests\**\*.cs" Exclude="bin\**;obj\**" Link="Tests\%(RecursiveDir)%(Filename)%(Extension)" />
<Compile Remove="..\ImageSharp.Tests\obj\**\*.cs" /> <Compile Remove="..\ImageSharp.Tests\obj\**\*.cs" />
<Compile Remove="..\ImageSharp.Tests\bin\**\*.cs" /> <Compile Remove="..\ImageSharp.Tests\bin\**\*.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
</Project> </Project>

7
tests/ImageSharp.Tests/ImageSharp.Tests.csproj

@ -28,15 +28,12 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="7.9.0.1" /> <PackageReference Include="Magick.NET-Q16-AnyCPU" Version="7.9.0.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="System.Drawing.Common" Version="4.5.0" /> <PackageReference Include="System.Drawing.Common" Version="4.5.0" />
<PackageReference Include="xunit" Version="2.3.1" /> <PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.console" Version="2.3.1" /> <PackageReference Include="xunit.runner.console" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.3.1" /> <PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Moq" Version="4.8.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" /> <AdditionalFiles Include="..\..\stylecop.json" />

Loading…
Cancel
Save