From ab3fffde0a96275026c7056369f58100c4b42a83 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 4 Nov 2016 16:24:20 -0400 Subject: remove unused extensions --- src/StardewModdingAPI/Extensions.cs | 34 ---------------------------------- 1 file changed, 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")] - public static string ToSingular(this IEnumerable ienum, string split = ", ") - { - Log.AsyncR("The usage of ToSingular has changed. Please update your call to use ToSingular"); - return ""; - } - public static string ToSingular(this IEnumerable 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(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); -- cgit