Browse Source

Fix build on .NET core 2.1

pull/1918/head
Ynse Hoornenborg 5 years ago
parent
commit
32aa75b345
  1. 5
      src/ImageSharp/Metadata/Profiles/XMP/XElementEqualityComparer.cs
  2. 10
      tests/ImageSharp.Tests/Metadata/Profiles/XMP/XmpProfileTests.cs

5
src/ImageSharp/Metadata/Profiles/XMP/XElementEqualityComparer.cs

@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Xml.Linq;
namespace SixLabors.ImageSharp.Metadata.Profiles.Xmp
@ -13,9 +12,9 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Xmp
public class XElementEqualityComparer : IEqualityComparer<XElement>
{
/// <inheritdoc />
public bool Equals([AllowNull] XElement x, [AllowNull] XElement y) => x.Name == y.Name && x.Value == y.Value;
public bool Equals(XElement x, XElement y) => x.Name == y.Name && x.Value == y.Value;
/// <inheritdoc />
public int GetHashCode([DisallowNull] XElement obj) => obj.GetHashCode();
public int GetHashCode(XElement obj) => obj.GetHashCode();
}
}

10
tests/ImageSharp.Tests/Metadata/Profiles/XMP/XmpProfileTests.cs

@ -19,15 +19,15 @@ namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Xmp
{
public class XmpProfileTests
{
private static GifDecoder GifDecoder => new GifDecoder() { IgnoreMetadata = false };
private static GifDecoder GifDecoder => new() { IgnoreMetadata = false };
private static JpegDecoder JpegDecoder => new JpegDecoder() { IgnoreMetadata = false };
private static JpegDecoder JpegDecoder => new() { IgnoreMetadata = false };
private static PngDecoder PngDecoder => new PngDecoder() { IgnoreMetadata = false };
private static PngDecoder PngDecoder => new() { IgnoreMetadata = false };
private static TiffDecoder TiffDecoder => new TiffDecoder() { IgnoreMetadata = false };
private static TiffDecoder TiffDecoder => new() { IgnoreMetadata = false };
private static WebpDecoder WebpDecoder => new WebpDecoder() { IgnoreMetadata = false };
private static WebpDecoder WebpDecoder => new() { IgnoreMetadata = false };
[Theory]
[WithFile(TestImages.Gif.Receipt, PixelTypes.Rgba32)]

Loading…
Cancel
Save