summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Serialisation/StringEnumConverter.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-01-20 21:29:47 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-01-20 21:29:47 -0500
commit894fd25a18cd5ddf31a905860aca95c438894efd (patch)
tree186d873b91e0b1bee2927aeef96b6513710af497 /src/SMAPI/Framework/Serialisation/StringEnumConverter.cs
parent9636d5b3aac99459e5933bc4fa6ddb8ca84917af (diff)
downloadSMAPI-894fd25a18cd5ddf31a905860aca95c438894efd.tar.gz
SMAPI-894fd25a18cd5ddf31a905860aca95c438894efd.tar.bz2
SMAPI-894fd25a18cd5ddf31a905860aca95c438894efd.zip
move converters into namespace
Diffstat (limited to 'src/SMAPI/Framework/Serialisation/StringEnumConverter.cs')
-rw-r--r--src/SMAPI/Framework/Serialisation/StringEnumConverter.cs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/SMAPI/Framework/Serialisation/StringEnumConverter.cs b/src/SMAPI/Framework/Serialisation/StringEnumConverter.cs
deleted file mode 100644
index 7afe86cd..00000000
--- a/src/SMAPI/Framework/Serialisation/StringEnumConverter.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 StringEnumConverter<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);
- }
- }
-}