summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-11-04 16:24:20 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-11-04 16:24:20 -0400
commitab3fffde0a96275026c7056369f58100c4b42a83 (patch)
tree422fc417892689488d1bebcbe0f4386b53d54b6a
parent7fe6dafbaa0b01bf18b4973e2f537cbe1b002c1e (diff)
downloadSMAPI-ab3fffde0a96275026c7056369f58100c4b42a83.tar.gz
SMAPI-ab3fffde0a96275026c7056369f58100c4b42a83.tar.bz2
SMAPI-ab3fffde0a96275026c7056369f58100c4b42a83.zip
remove unused extensions
-rw-r--r--src/StardewModdingAPI/Extensions.cs34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/StardewModdingAPI/Extensions.cs b/src/StardewModdingAPI/Extensions.cs
index 5726e882..9a8c55f4 100644
--- a/src/StardewModdingAPI/Extensions.cs
+++ b/src/StardewModdingAPI/Extensions.cs
@@ -3,7 +3,6 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
-using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
namespace StardewModdingAPI
@@ -17,18 +16,6 @@ namespace StardewModdingAPI
return Keyboard.GetState().IsKeyDown(key);
}
- public static Color RandomColour()
- {
- return new Color(Random.Next(0, 255), Random.Next(0, 255), Random.Next(0, 255));
- }
-
- [Obsolete("The usage of ToSingular has changed. Please update your call to use ToSingular<T>")]
- public static string ToSingular(this IEnumerable ienum, string split = ", ")
- {
- Log.AsyncR("The usage of ToSingular has changed. Please update your call to use ToSingular<T>");
- return "";
- }
-
public static string ToSingular<T>(this IEnumerable<T> ienum, string split = ", ") // where T : class
{
//Apparently Keys[] won't split normally :l
@@ -50,17 +37,6 @@ namespace StardewModdingAPI
return int.Parse(o.ToString());
}
- public static bool IsBool(this object o)
- {
- bool b;
- return bool.TryParse(o.ToString(), out b);
- }
-
- public static bool AsBool(this object o)
- {
- return bool.Parse(o.ToString());
- }
-
public static int GetHash(this IEnumerable enumerable)
{
var hash = 0;
@@ -71,16 +47,6 @@ namespace StardewModdingAPI
return hash;
}
- public static T Cast<T>(this object o) where T : class
- {
- return o as T;
- }
-
- public static FieldInfo[] GetPrivateFields(this object o)
- {
- return o.GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Static);
- }
-
public static FieldInfo GetBaseFieldInfo(this Type t, string name)
{
return t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Static);