summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Serialisation/SmapiConverters/StringEnumConverter.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-06-05 20:22:46 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-06-05 20:22:46 -0400
commit625c538f244519700f3942b2b2969845db9a99b0 (patch)
treed13596220a62616838310cbcf0f0004e2f843da3 /src/SMAPI/Framework/Serialisation/SmapiConverters/StringEnumConverter.cs
parent265ce35fd1db677230ddb16483b4d92e7c13a777 (diff)
downloadSMAPI-625c538f244519700f3942b2b2969845db9a99b0.tar.gz
SMAPI-625c538f244519700f3942b2b2969845db9a99b0.tar.bz2
SMAPI-625c538f244519700f3942b2b2969845db9a99b0.zip
move manifest parsing into toolkit (#532)
Diffstat (limited to 'src/SMAPI/Framework/Serialisation/SmapiConverters/StringEnumConverter.cs')
-rw-r--r--src/SMAPI/Framework/Serialisation/SmapiConverters/StringEnumConverter.cs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/SMAPI/Framework/Serialisation/SmapiConverters/StringEnumConverter.cs b/src/SMAPI/Framework/Serialisation/SmapiConverters/StringEnumConverter.cs
deleted file mode 100644
index c88ac834..00000000
--- a/src/SMAPI/Framework/Serialisation/SmapiConverters/StringEnumConverter.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using Newtonsoft.Json.Converters;
-
-namespace StardewModdingAPI.Framework.Serialisation.SmapiConverters
-{
- /// <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);
- }
- }
-}