From 4f7b858542558df0e965e3cb649811a39040932b Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Mon, 13 Nov 2023 22:58:09 +0100 Subject: [PATCH] Make the struct readonly that can be readonly. --- src/Magick.NET.Core/Types/Number.cs | 2 +- src/Magick.NET.Core/Types/Percentage.cs | 2 +- src/Magick.NET.Core/Types/Rational.cs | 2 +- src/Magick.NET.Core/Types/SignedRational.cs | 2 +- src/Magick.NET.Core/Types/Threshold.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Magick.NET.Core/Types/Number.cs b/src/Magick.NET.Core/Types/Number.cs index 914da3d717..4e119f33cc 100644 --- a/src/Magick.NET.Core/Types/Number.cs +++ b/src/Magick.NET.Core/Types/Number.cs @@ -8,7 +8,7 @@ namespace ImageMagick; /// /// Represents an exif number. /// -public struct Number : IEquatable, IComparable +public readonly struct Number : IEquatable, IComparable { private readonly uint _value; diff --git a/src/Magick.NET.Core/Types/Percentage.cs b/src/Magick.NET.Core/Types/Percentage.cs index d9645e253f..3559d43548 100644 --- a/src/Magick.NET.Core/Types/Percentage.cs +++ b/src/Magick.NET.Core/Types/Percentage.cs @@ -9,7 +9,7 @@ namespace ImageMagick; /// /// Represents a percentage value. /// -public struct Percentage : IEquatable, IComparable +public readonly struct Percentage : IEquatable, IComparable { private readonly double _value; diff --git a/src/Magick.NET.Core/Types/Rational.cs b/src/Magick.NET.Core/Types/Rational.cs index 43858d549b..f04444729a 100644 --- a/src/Magick.NET.Core/Types/Rational.cs +++ b/src/Magick.NET.Core/Types/Rational.cs @@ -12,7 +12,7 @@ namespace ImageMagick; /// /// This is a very simplified implementation of a rational number designed for use with metadata only. /// -public struct Rational : IEquatable +public readonly struct Rational : IEquatable { /// /// Initializes a new instance of the struct. diff --git a/src/Magick.NET.Core/Types/SignedRational.cs b/src/Magick.NET.Core/Types/SignedRational.cs index ca81185826..a8f5d5eaf3 100644 --- a/src/Magick.NET.Core/Types/SignedRational.cs +++ b/src/Magick.NET.Core/Types/SignedRational.cs @@ -12,7 +12,7 @@ namespace ImageMagick; /// /// This is a very simplified implementation of a rational number designed for use with metadata only. /// -public struct SignedRational : IEquatable +public readonly struct SignedRational : IEquatable { /// /// Initializes a new instance of the struct. diff --git a/src/Magick.NET.Core/Types/Threshold.cs b/src/Magick.NET.Core/Types/Threshold.cs index e8eeb9fd1c..40affdf325 100644 --- a/src/Magick.NET.Core/Types/Threshold.cs +++ b/src/Magick.NET.Core/Types/Threshold.cs @@ -9,7 +9,7 @@ namespace ImageMagick; /// /// Struct for a threshold with a minimum and maximum. /// -public struct Threshold : IEquatable +public readonly struct Threshold : IEquatable { /// /// Initializes a new instance of the struct.