Skip to content

Commit

Permalink
typo: TiffReadDefines.IgnoreExifPoperties -> IgnoreExifProperties (#1556
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Gounlaf authored Feb 16, 2024
1 parent 3c0dc19 commit efbdf80
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
15 changes: 13 additions & 2 deletions src/Magick.NET/Formats/Tiff/TiffReadDefines.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -19,7 +20,17 @@ public MagickFormat Format
/// <summary>
/// Gets or sets a value indicating whether the exif profile should be ignored (tiff:exif-properties).
/// </summary>
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;
}

/// <summary>
/// Gets or sets a value indicating whether the exif profile should be ignored (tiff:exif-properties).
/// </summary>
public bool? IgnoreExifProperties { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the layers should be ignored (tiff:ignore-layers).
Expand All @@ -38,7 +49,7 @@ public IEnumerable<IDefine> Defines
{
get
{
if (IgnoreExifPoperties.Equals(true))
if (IgnoreExifProperties.Equals(true))
yield return new MagickDefine(Format, "exif-properties", false);

if (IgnoreLayers is not null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand All @@ -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"));
Expand All @@ -42,7 +42,7 @@ public void ShouldIgnoreTheExifProperties()
{
Defines = new TiffReadDefines
{
IgnoreExifPoperties = true,
IgnoreExifProperties = true,
},
};

Expand Down

0 comments on commit efbdf80

Please sign in to comment.