From 1e008b409d6b6223a201500029ae627682cae130 Mon Sep 17 00:00:00 2001 From: tacosontitan Date: Tue, 12 Mar 2024 00:09:36 -0500 Subject: [PATCH] Renamed `SerializedAttribute` to `SerializedMemberAttribute`. --- ...{ISerializedAttribute.cs => ISerializedMemberAttribute.cs} | 2 +- src/Pasper/Reflection/IgnoreExtensions.cs | 2 +- .../{SerializedAttribute.cs => SerializedMemberAttribute.cs} | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/Pasper/{ISerializedAttribute.cs => ISerializedMemberAttribute.cs} (95%) rename src/Pasper/{SerializedAttribute.cs => SerializedMemberAttribute.cs} (91%) diff --git a/src/Pasper/ISerializedAttribute.cs b/src/Pasper/ISerializedMemberAttribute.cs similarity index 95% rename from src/Pasper/ISerializedAttribute.cs rename to src/Pasper/ISerializedMemberAttribute.cs index 38629d7..a2ebb59 100644 --- a/src/Pasper/ISerializedAttribute.cs +++ b/src/Pasper/ISerializedMemberAttribute.cs @@ -23,7 +23,7 @@ namespace Pasper; /// [SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "This is an interface representing an attribute.")] -public interface ISerializedAttribute +public interface ISerializedMemberAttribute { /// /// The name of the member when serialized. diff --git a/src/Pasper/Reflection/IgnoreExtensions.cs b/src/Pasper/Reflection/IgnoreExtensions.cs index 8bceab0..c0d0d24 100644 --- a/src/Pasper/Reflection/IgnoreExtensions.cs +++ b/src/Pasper/Reflection/IgnoreExtensions.cs @@ -40,7 +40,7 @@ public static bool IsIgnored(this PropertyInfo source) private static bool ImplementsIgnoredInterface(object attribute) { - Type attributeType = attribute.GetType(); + var attributeType = attribute.GetType(); return typeof(IIgnoreAttribute).IsAssignableFrom(attributeType); } } diff --git a/src/Pasper/SerializedAttribute.cs b/src/Pasper/SerializedMemberAttribute.cs similarity index 91% rename from src/Pasper/SerializedAttribute.cs rename to src/Pasper/SerializedMemberAttribute.cs index 474a602..f4ae36d 100644 --- a/src/Pasper/SerializedAttribute.cs +++ b/src/Pasper/SerializedMemberAttribute.cs @@ -21,9 +21,9 @@ namespace Pasper; /// /// The name of the member when serialized. [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] -public sealed class SerializedAttribute(string name) +public sealed class SerializedMemberAttribute(string name) : Attribute, - ISerializedAttribute + ISerializedMemberAttribute { /// /// Gets or sets the name of the member when serialized.