diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-01-20 21:29:47 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-01-20 21:29:47 -0500 |
commit | 894fd25a18cd5ddf31a905860aca95c438894efd (patch) | |
tree | 186d873b91e0b1bee2927aeef96b6513710af497 /src/SMAPI/Framework/Serialisation/StringEnumConverter.cs | |
parent | 9636d5b3aac99459e5933bc4fa6ddb8ca84917af (diff) | |
download | SMAPI-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.cs | 22 |
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); - } - } -} |