From efbdf806039b4c648310246724332022e7ed358e Mon Sep 17 00:00:00 2001 From: Florian Levis Date: Fri, 16 Feb 2024 14:14:36 +0100 Subject: [PATCH] typo: TiffReadDefines.IgnoreExifPoperties -> IgnoreExifProperties (#1556) --- src/Magick.NET/Formats/Tiff/TiffReadDefines.cs | 15 +++++++++++++-- .../TheIgnoreExifPopertiesProperty.cs | 6 +++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/Magick.NET/Formats/Tiff/TiffReadDefines.cs b/src/Magick.NET/Formats/Tiff/TiffReadDefines.cs index 534e930ecb..bd90377786 100644 --- a/src/Magick.NET/Formats/Tiff/TiffReadDefines.cs +++ b/src/Magick.NET/Formats/Tiff/TiffReadDefines.cs @@ -1,6 +1,7 @@ // Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. // Licensed under the Apache License, Version 2.0. +using System; using System.Collections.Generic; namespace ImageMagick.Formats; @@ -19,7 +20,17 @@ public MagickFormat Format /// /// Gets or sets a value indicating whether the exif profile should be ignored (tiff:exif-properties). /// - public bool? IgnoreExifPoperties { get; set; } + [Obsolete($"This property will be removed in the next major release, use {nameof(IgnoreExifProperties)} instead.")] + public bool? IgnoreExifPoperties + { + get => IgnoreExifProperties; + set => IgnoreExifProperties = value; + } + + /// + /// Gets or sets a value indicating whether the exif profile should be ignored (tiff:exif-properties). + /// + public bool? IgnoreExifProperties { get; set; } /// /// Gets or sets a value indicating whether the layers should be ignored (tiff:ignore-layers). @@ -38,7 +49,7 @@ public IEnumerable Defines { get { - if (IgnoreExifPoperties.Equals(true)) + if (IgnoreExifProperties.Equals(true)) yield return new MagickDefine(Format, "exif-properties", false); if (IgnoreLayers is not null) diff --git a/tests/Magick.NET.Tests/Formats/Tiff/TiffReadDefinesTests/TheIgnoreExifPopertiesProperty.cs b/tests/Magick.NET.Tests/Formats/Tiff/TiffReadDefinesTests/TheIgnoreExifPopertiesProperty.cs index d6a3f59a4d..400d66c3ff 100644 --- a/tests/Magick.NET.Tests/Formats/Tiff/TiffReadDefinesTests/TheIgnoreExifPopertiesProperty.cs +++ b/tests/Magick.NET.Tests/Formats/Tiff/TiffReadDefinesTests/TheIgnoreExifPopertiesProperty.cs @@ -17,7 +17,7 @@ public void ShouldSetTheDefine() using var image = new MagickImage(); image.Settings.SetDefines(new TiffReadDefines { - IgnoreExifPoperties = true, + IgnoreExifProperties = true, }); Assert.Equal("false", image.Settings.GetDefine(MagickFormat.Tiff, "exif-properties")); @@ -29,7 +29,7 @@ public void ShouldNotSetTheDefineWhenTheValueIsFalse() using var image = new MagickImage(); image.Settings.SetDefines(new TiffReadDefines { - IgnoreExifPoperties = false, + IgnoreExifProperties = false, }); Assert.Null(image.Settings.GetDefine(MagickFormat.Tiff, "exif-properties")); @@ -42,7 +42,7 @@ public void ShouldIgnoreTheExifProperties() { Defines = new TiffReadDefines { - IgnoreExifPoperties = true, + IgnoreExifProperties = true, }, };