summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-18 16:58:42 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-18 16:58:42 -0400
commita4fb2331fe57102aa8e8b30efb8095a1edb6b923 (patch)
tree67aa7021752bdffd92fa405c8b1717d0a6a0d544 /src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs
parent51a2c3991f3c76197afb21a42a30f2a91a7f9908 (diff)
downloadSMAPI-a4fb2331fe57102aa8e8b30efb8095a1edb6b923.tar.gz
SMAPI-a4fb2331fe57102aa8e8b30efb8095a1edb6b923.tar.bz2
SMAPI-a4fb2331fe57102aa8e8b30efb8095a1edb6b923.zip
simplify JSON converter name
Diffstat (limited to 'src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs')
-rw-r--r--src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs b/src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs
deleted file mode 100644
index e825c880..00000000
--- a/src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using Newtonsoft.Json.Converters;
-
-namespace StardewModdingAPI.Framework.Serialisation
-{
- /// <summary>A variant of <see cref="StringEnumConverter"/> which only converts a specified enum.</summary>
- /// <typeparam name="T">The enum type.</typeparam>
- internal class SelectiveStringEnumConverter<T> : StringEnumConverter
- {
- /*********
- ** Public methods
- *********/
- /// <summary>Get whether this instance can convert the specified object type.</summary>
- /// <param name="type">The object type.</param>
- public override bool CanConvert(Type type)
- {
- return
- base.CanConvert(type)
- && (Nullable.GetUnderlyingType(type) ?? type) == typeof(T);
- }
- }
-}