diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f136ae..ead7edb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ Improvements
Removals
- Marked SpriteAnimation.ByName obsolete in favor of the new indexer
+- **Removed obsolete methods and types CharExtensions, GenericFont.OneEmSpace, Code.GetReplacementString, TokenizedString.Measure, Keybind.GetDownTime, Keybind.GetUpTime, Keybind.GetTimeSincePress, EnumHelper, non-generic GenericDataHolder methods, as well as InputHandler key, gamepad and mouse-specific methods**
### MLEM.Ui
Additions
@@ -49,11 +50,18 @@ Fixes
- Fixed auto-sized elements sometimes updating their location based on outdated parent positions
- Fixed Panel.ScrollToElement not scrolling correctly when the panel's area is dirty
+Removals
+- **Removed obsolete methods and properties Element.BeginImpl, Element.OnDisposed, parameter-heavy versions of Element.DrawTransformed and Element.Draw, Element.DrawEarly, Element.Dispose, Element.BeginDelegate, Tooltip.Paragraph, UiSystem.BlendState, UiSystem.SamplerState, UiSystem.DepthStencilState, UiSystem.Effect, as well as the StyleProp equality members**
+
### MLEM.Extended
Improvements
- **Added compatibility for MonoGame.Extended 4.0.0**
- Added compatibility for FNA.Extended
+### MLEM.Data
+Removals
+- **Removed obsolete types DynamicEnumConverter, CopyExtensions, DynamicEnum, NetBufferSerializer, and NetExtensions**
+
## 6.3.1
No code changes
diff --git a/MLEM.Data/CopyExtensions.cs b/MLEM.Data/CopyExtensions.cs
deleted file mode 100644
index a4faf83..0000000
--- a/MLEM.Data/CopyExtensions.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-
-#if NET6_0_OR_GREATER
-using System.Diagnostics.CodeAnalysis;
-#endif
-
-namespace MLEM.Data {
- ///
- /// A set of extensions for dealing with copying objects.
- ///
- [Obsolete("CopyExtensions has major flaws and insufficient speed compared to other libraries specifically designed for copying objects.")]
-#if NET6_0_OR_GREATER
- [UnconditionalSuppressMessage("Aot", "IL3050"), UnconditionalSuppressMessage("Aot", "IL2070"), UnconditionalSuppressMessage("Aot", "IL2090")]
-#endif
- public static class CopyExtensions {
-
- private const BindingFlags DefaultFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
- private static readonly Dictionary ConstructorCache = new Dictionary();
-
- ///
- /// Creates a shallow copy of the object and returns it.
- /// Object creation occurs using a constructor with the or, if none is present, the first constructor with the correct .
- ///
- /// The object to create a shallow copy of
- /// The binding flags for field searching
- /// A predicate that determines whether or not the given field should be copied. If null, all fields will be copied.
- /// The type of the object to copy
- /// A shallow copy of the object
- [Obsolete("CopyExtensions has major flaws and insufficient speed compared to other libraries specifically designed for copying objects.")]
- public static T Copy(this T obj, BindingFlags flags = CopyExtensions.DefaultFlags, Predicate fieldInclusion = null) {
- var copy = (T) CopyExtensions.Construct(typeof(T), flags);
- obj.CopyInto(copy, flags, fieldInclusion);
- return copy;
- }
-
- ///
- /// Creates a deep copy of the object and returns it.
- /// Object creation occurs using a constructor with the or, if none is present, the first constructor with the correct .
- ///
- /// The object to create a deep copy of
- /// The binding flags for field searching
- /// A predicate that determines whether or not the given field should be copied. If null, all fields will be copied.
- /// The type of the object to copy
- /// A deep copy of the object
- [Obsolete("CopyExtensions has major flaws and insufficient speed compared to other libraries specifically designed for copying objects.")]
- public static T DeepCopy(this T obj, BindingFlags flags = CopyExtensions.DefaultFlags, Predicate fieldInclusion = null) {
- var copy = (T) CopyExtensions.Construct(typeof(T), flags);
- obj.DeepCopyInto(copy, flags, fieldInclusion);
- return copy;
- }
-
- ///
- /// Copies the given object into the given object in a shallow manner.
- ///
- /// The object to create a shallow copy of
- /// The object to copy into
- /// The binding flags for field searching
- /// A predicate that determines whether or not the given field should be copied. If null, all fields will be copied.
- /// The type of the object to copy
- [Obsolete("CopyExtensions has major flaws and insufficient speed compared to other libraries specifically designed for copying objects.")]
- public static void CopyInto(this T obj, T otherObj, BindingFlags flags = CopyExtensions.DefaultFlags, Predicate fieldInclusion = null) {
- foreach (var field in typeof(T).GetFields(flags)) {
- if (fieldInclusion == null || fieldInclusion(field))
- field.SetValue(otherObj, field.GetValue(obj));
- }
- }
-
- ///
- /// Copies the given object into the given object in a deep manner.
- /// Object creation occurs using a constructor with the or, if none is present, the first constructor with the correct .
- ///
- /// The object to create a deep copy of
- /// The object to copy into
- /// The binding flags for field searching
- /// A predicate that determines whether or not the given field should be copied. If null, all fields will be copied.
- /// The type of the object to copy
- [Obsolete("CopyExtensions has major flaws and insufficient speed compared to other libraries specifically designed for copying objects.")]
- public static void DeepCopyInto(this T obj, T otherObj, BindingFlags flags = CopyExtensions.DefaultFlags, Predicate fieldInclusion = null) {
- foreach (var field in obj.GetType().GetFields(flags)) {
- if (fieldInclusion != null && !fieldInclusion(field))
- continue;
- var val = field.GetValue(obj);
- if (val == null || field.FieldType.IsValueType) {
- // if we're a value type (struct or primitive) or null, we can just set the value
- field.SetValue(otherObj, val);
- } else {
- var otherVal = field.GetValue(otherObj);
- // if the object we want to copy into doesn't have a value yet, we create one
- if (otherVal == null) {
- otherVal = CopyExtensions.Construct(field.FieldType, flags);
- field.SetValue(otherObj, otherVal);
- }
- val.DeepCopyInto(otherVal, flags);
- }
- }
- }
-
- private static object Construct(Type t, BindingFlags flags) {
- if (!CopyExtensions.ConstructorCache.TryGetValue(t, out var constructor)) {
- var constructors = t.GetConstructors(flags);
- // find a contructor with the correct attribute
- constructor = constructors.FirstOrDefault(c => c.GetCustomAttribute() != null);
- // find a parameterless construcotr
- if (constructor == null)
- constructor = t.GetConstructor(flags, null, Type.EmptyTypes, null);
- // fall back to the first constructor
- if (constructor == null)
- constructor = constructors.FirstOrDefault();
- if (constructor == null)
- throw new NullReferenceException($"Type {t} does not have a constructor with the required visibility");
- CopyExtensions.ConstructorCache.Add(t, constructor);
- }
- return constructor.Invoke(new object[constructor.GetParameters().Length]);
- }
-
- }
-
- ///
- /// An attribute that, when added to a constructor, will make that constructor the one used by , and .
- ///
- [AttributeUsage(AttributeTargets.Constructor), Obsolete("CopyExtensions has major flaws and insufficient speed compared to other libraries specifically designed for copying objects.")]
- public class CopyConstructorAttribute : Attribute {}
-}
diff --git a/MLEM.Data/DynamicEnum.cs b/MLEM.Data/DynamicEnum.cs
deleted file mode 100644
index f8c6c41..0000000
--- a/MLEM.Data/DynamicEnum.cs
+++ /dev/null
@@ -1,410 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Numerics;
-using System.Reflection;
-using MLEM.Data.Json;
-using Newtonsoft.Json;
-
-namespace MLEM.Data {
- ///
- /// A dynamic enum is a class that represents enum-like single-instance value behavior with additional capabilities, including dynamic addition of new arbitrary values.
- /// A dynamic enum uses as its underlying type, allowing for an arbitrary number of enum values to be created, even when a -like structure is used that would only allow for up to 64 values in a regular enum.
- /// All enum operations including , , and are supported and can be implemented in derived classes using operator overloads.
- /// To create a custom dynamic enum, simply create a class that extends . New values can then be added using , or .
- ///
- ///
- /// To include enum-like operator overloads in a dynamic enum named MyEnum, the following code can be used:
- ///
- /// public static implicit operator BigInteger(MyEnum value) => GetValue(value);
- /// public static implicit operator MyEnum(BigInteger value) => GetEnumValue<MyEnum>(value);
- /// public static MyEnum operator |(MyEnum left, MyEnum right) => Or(left, right);
- /// public static MyEnum operator &(MyEnum left, MyEnum right) => And(left, right);
- /// public static MyEnum operator ^(MyEnum left, MyEnum right) => Xor(left, right);
- /// public static MyEnum operator ~(MyEnum value) => Neg(value);
- ///
- ///
- [Obsolete("DynamicEnum has been moved into the DynamicEnums library: https://www.nuget.org/packages/DynamicEnums"), JsonConverter(typeof(DynamicEnumConverter))]
-#if NET6_0_OR_GREATER
- [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Aot", "IL2067")]
-#endif
- public abstract class DynamicEnum {
-
- private static readonly Dictionary Storages = new Dictionary();
- private readonly BigInteger value;
-
- private Dictionary allFlagsCache;
- private Dictionary anyFlagsCache;
- private string name;
-
- ///
- /// Creates a new dynamic enum instance.
- /// This constructor is protected as it is only invoked via reflection.
- ///
- /// The name of the enum value
- /// The value
- protected DynamicEnum(string name, BigInteger value) {
- this.value = value;
- this.name = name;
- }
-
- ///
- /// Returns true if this enum value has ALL of the given flags on it.
- /// This operation is equivalent to .
- ///
- ///
- /// The flags to query
- /// True if all of the flags are present, false otherwise
- public bool HasFlag(DynamicEnum flags) {
- if (this.allFlagsCache == null)
- this.allFlagsCache = new Dictionary();
- if (!this.allFlagsCache.TryGetValue(flags, out var ret)) {
- ret = (DynamicEnum.GetValue(this) & DynamicEnum.GetValue(flags)) == DynamicEnum.GetValue(flags);
- this.allFlagsCache.Add(flags, ret);
- }
- return ret;
- }
-
- ///
- /// Returns true if this enum value has ANY of the given flags on it
- ///
- ///
- /// The flags to query
- /// True if one of the flags is present, false otherwise
- public bool HasAnyFlag(DynamicEnum flags) {
- if (this.anyFlagsCache == null)
- this.anyFlagsCache = new Dictionary();
- if (!this.anyFlagsCache.TryGetValue(flags, out var ret)) {
- ret = (DynamicEnum.GetValue(this) & DynamicEnum.GetValue(flags)) != 0;
- this.anyFlagsCache.Add(flags, ret);
- }
- return ret;
- }
-
- /// Returns a string that represents the current object.
- /// A string that represents the current object.
- public override string ToString() {
- if (this.name == null) {
- var included = new List();
- if (DynamicEnum.GetValue(this) != 0) {
- foreach (var v in DynamicEnum.GetValues(this.GetType())) {
- if (this.HasFlag(v) && DynamicEnum.GetValue(v) != 0)
- included.Add(v);
- }
- }
- this.name = included.Count > 0 ? string.Join(" | ", included) : DynamicEnum.GetValue(this).ToString();
- }
- return this.name;
- }
-
- ///
- /// Adds a new enum value to the given enum type
- ///
- /// The name of the enum value to add
- /// The value to add
- /// The type to add this value to
- /// The newly created enum value
- /// Thrown if the name or value passed are already present
- public static T Add(string name, BigInteger value) where T : DynamicEnum {
- var storage = DynamicEnum.GetStorage(typeof(T));
-
- // cached parsed values and names might be incomplete with new values
- storage.ClearCaches();
-
- if (storage.Values.ContainsKey(value))
- throw new ArgumentException($"Duplicate value {value}", nameof(value));
- foreach (var v in storage.Values.Values) {
- if (v.name == name)
- throw new ArgumentException($"Duplicate name {name}", nameof(name));
- }
-
- var ret = DynamicEnum.Construct(typeof(T), name, value);
- storage.Values.Add(value, ret);
- return (T) ret;
- }
-
- ///
- /// Adds a new enum value to the given enum type .
- /// This method differs from in that it automatically determines a value.
- /// The value determined will be the next free number in a sequence, which represents the default behavior in an enum if enum values are not explicitly numbered.
- ///
- /// The name of the enum value to add
- /// The type to add this value to
- /// The newly created enum value
- public static T AddValue(string name) where T : DynamicEnum {
- BigInteger value = 0;
- while (DynamicEnum.IsDefined(typeof(T), value))
- value++;
- return DynamicEnum.Add(name, value);
- }
-
- ///
- /// Adds a new flag enum value to the given enum type .
- /// This method differs from in that it automatically determines a value.
- /// The value determined will be the next free power of two, allowing enum values to be combined using bitwise operations to create -like behavior.
- ///
- /// The name of the enum value to add
- /// The type to add this value to
- /// The newly created enum value
- public static T AddFlag(string name) where T : DynamicEnum {
- BigInteger value = 1;
- while (DynamicEnum.IsDefined(typeof(T), value))
- value <<= 1;
- return DynamicEnum.Add(name, value);
- }
-
- ///
- /// Returns a collection of all of the enum values that are explicitly defined for the given dynamic enum type .
- /// A value counts as explicitly defined if it has been added using , or .
- ///
- /// The type whose values to get
- /// The defined values for the given type
- public static IEnumerable GetValues() where T : DynamicEnum {
- return DynamicEnum.GetValues(typeof(T)).Cast();
- }
-
- ///
- /// Returns a collection of all of the enum values that are explicitly defined for the given dynamic enum type .
- /// A value counts as explicitly defined if it has been added using , or .
- ///
- /// The type whose values to get
- /// The defined values for the given type
- public static IEnumerable GetValues(Type type) {
- return DynamicEnum.GetStorage(type).Values.Values;
- }
-
- ///
- /// Returns all of the defined values from the given dynamic enum type which are contained in .
- /// Note that, if combined flags are defined in , and contains them, they will also be returned.
- ///
- /// The combined flags whose individual flags to return.
- /// Whether the enum value 0 should also be returned, if contains one.
- /// The type of enum.
- /// All of the flags that make up .
- public static IEnumerable GetFlags(T combinedFlag, bool includeZero = true) where T : DynamicEnum {
- foreach (var flag in DynamicEnum.GetValues()) {
- if (combinedFlag.HasFlag(flag) && (includeZero || DynamicEnum.GetValue(flag) != BigInteger.Zero))
- yield return flag;
- }
- }
-
- ///
- /// Returns all of the defined unique flags from the given dynamic enum type which are contained in .
- /// Any combined flags (flags that aren't powers of two) which are defined in will not be returned.
- ///
- /// The combined flags whose individual flags to return.
- /// The type of enum.
- /// All of the unique flags that make up .
- public static IEnumerable GetUniqueFlags(T combinedFlag) where T : DynamicEnum {
- // we can't use the same method here as EnumHelper.GetUniqueFlags since DynamicEnum doesn't guarantee sorted values
- var max = DynamicEnum.GetValues().Max(DynamicEnum.GetValue);
- var uniqueFlag = BigInteger.One;
- while (uniqueFlag <= max) {
- if (DynamicEnum.IsDefined(typeof(T), uniqueFlag)) {
- var uniqueFlagValue = DynamicEnum.GetEnumValue(uniqueFlag);
- if (combinedFlag.HasFlag(uniqueFlagValue))
- yield return uniqueFlagValue;
- }
- uniqueFlag <<= 1;
- }
- }
-
- ///
- /// Returns the bitwise OR (|) combination of the two dynamic enum values
- ///
- /// The left value
- /// The right value
- /// The type of the values
- /// The bitwise OR (|) combination
- public static T Or(T left, T right) where T : DynamicEnum {
- var cache = DynamicEnum.GetStorage(typeof(T)).OrCache;
- if (!cache.TryGetValue((left, right), out var ret)) {
- ret = DynamicEnum.GetEnumValue(DynamicEnum.GetValue(left) | DynamicEnum.GetValue(right));
- cache.Add((left, right), ret);
- }
- return (T) ret;
- }
-
- ///
- /// Returns the bitwise AND (&) combination of the two dynamic enum values
- ///
- /// The left value
- /// The right value
- /// The type of the values
- /// The bitwise AND (&) combination
- public static T And(T left, T right) where T : DynamicEnum {
- var cache = DynamicEnum.GetStorage(typeof(T)).AndCache;
- if (!cache.TryGetValue((left, right), out var ret)) {
- ret = DynamicEnum.GetEnumValue(DynamicEnum.GetValue(left) & DynamicEnum.GetValue(right));
- cache.Add((left, right), ret);
- }
- return (T) ret;
- }
-
- ///
- /// Returns the bitwise XOR (^) combination of the two dynamic enum values
- ///
- /// The left value
- /// The right value
- /// The type of the values
- /// The bitwise XOR (^) combination
- public static T Xor(T left, T right) where T : DynamicEnum {
- var cache = DynamicEnum.GetStorage(typeof(T)).XorCache;
- if (!cache.TryGetValue((left, right), out var ret)) {
- ret = DynamicEnum.GetEnumValue(DynamicEnum.GetValue(left) ^ DynamicEnum.GetValue(right));
- cache.Add((left, right), ret);
- }
- return (T) ret;
- }
-
- ///
- /// Returns the bitwise NEG (~) combination of the dynamic enum value
- ///
- /// The value
- /// The type of the values
- /// The bitwise NEG (~) value
- public static T Neg(T value) where T : DynamicEnum {
- var cache = DynamicEnum.GetStorage(typeof(T)).NegCache;
- if (!cache.TryGetValue(value, out var ret)) {
- ret = DynamicEnum.GetEnumValue(~DynamicEnum.GetValue(value));
- cache.Add(value, ret);
- }
- return (T) ret;
- }
-
- ///
- /// Returns the representation of the given dynamic enum value
- ///
- /// The value whose number representation to get
- /// The value's number representation
- public static BigInteger GetValue(DynamicEnum value) {
- return value?.value ?? 0;
- }
-
- ///
- /// Returns the defined or combined dynamic enum value for the given representation
- ///
- /// The value whose dynamic enum value to get
- /// The type that the returned dynamic enum should have
- /// The defined or combined dynamic enum value
- public static T GetEnumValue(BigInteger value) where T : DynamicEnum {
- return (T) DynamicEnum.GetEnumValue(typeof(T), value);
- }
-
- ///
- /// Returns the defined or combined dynamic enum value for the given representation
- ///
- /// The type that the returned dynamic enum should have
- /// The value whose dynamic enum value to get
- /// The defined or combined dynamic enum value
- public static DynamicEnum GetEnumValue(Type type, BigInteger value) {
- var storage = DynamicEnum.GetStorage(type);
-
- // get the defined value if it exists
- if (storage.Values.TryGetValue(value, out var defined))
- return defined;
-
- // otherwise, cache the combined value
- if (!storage.FlagCache.TryGetValue(value, out var combined)) {
- combined = DynamicEnum.Construct(type, null, value);
- storage.FlagCache.Add(value, combined);
- }
- return combined;
- }
-
- ///
- /// Parses the given into a dynamic enum value and returns the result.
- /// This method supports defined enum values as well as values combined using the pipe (|) character and any number of spaces.
- /// If no enum value can be parsed, null is returned.
- ///
- /// The string to parse into a dynamic enum value
- /// The type of the dynamic enum value to parse
- /// The parsed enum value, or null if parsing fails
- public static T Parse(string strg) where T : DynamicEnum {
- return (T) DynamicEnum.Parse(typeof(T), strg);
- }
-
- ///
- /// Parses the given into a dynamic enum value and returns the result.
- /// This method supports defined enum values as well as values combined using the pipe (|) character and any number of spaces.
- /// If no enum value can be parsed, null is returned.
- ///
- /// The type of the dynamic enum value to parse
- /// The string to parse into a dynamic enum value
- /// The parsed enum value, or null if parsing fails
- public static DynamicEnum Parse(Type type, string strg) {
- var cache = DynamicEnum.GetStorage(type).ParseCache;
- if (!cache.TryGetValue(strg, out var cached)) {
- BigInteger? accum = null;
- foreach (var val in strg.Split('|')) {
- foreach (var defined in DynamicEnum.GetValues(type)) {
- if (defined.name == val.Trim()) {
- accum = (accum ?? 0) | DynamicEnum.GetValue(defined);
- break;
- }
- }
- }
- if (accum != null)
- cached = DynamicEnum.GetEnumValue(type, accum.Value);
- cache.Add(strg, cached);
- }
- return cached;
- }
-
- ///
- /// Returns whether the given is defined in the given dynamic enum .
- /// A value counts as explicitly defined if it has been added using , or .
- ///
- /// The dynamic enum type to query.
- /// The value to query.
- /// Whether the is defined.
- public static bool IsDefined(Type type, BigInteger value) {
- return DynamicEnum.GetStorage(type).Values.ContainsKey(value);
- }
-
- ///
- /// Returns whether the given is defined in its dynamic enum type.
- /// A value counts as explicitly defined if it has been added using , or .
- ///
- /// The value to query.
- /// Whether the is defined.
- public static bool IsDefined(DynamicEnum value) {
- return value != null && DynamicEnum.IsDefined(value.GetType(), DynamicEnum.GetValue(value));
- }
-
- private static Storage GetStorage(Type type) {
- if (!DynamicEnum.Storages.TryGetValue(type, out var storage)) {
- storage = new Storage();
- DynamicEnum.Storages.Add(type, storage);
- }
- return storage;
- }
-
- private static DynamicEnum Construct(Type type, string name, BigInteger value) {
- return (DynamicEnum) Activator.CreateInstance(type, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new object[] {name, value}, CultureInfo.InvariantCulture);
- }
-
- private class Storage {
-
- public readonly Dictionary Values = new Dictionary();
- public readonly Dictionary FlagCache = new Dictionary();
- public readonly Dictionary ParseCache = new Dictionary();
- public readonly Dictionary<(DynamicEnum, DynamicEnum), DynamicEnum> OrCache = new Dictionary<(DynamicEnum, DynamicEnum), DynamicEnum>();
- public readonly Dictionary<(DynamicEnum, DynamicEnum), DynamicEnum> AndCache = new Dictionary<(DynamicEnum, DynamicEnum), DynamicEnum>();
- public readonly Dictionary<(DynamicEnum, DynamicEnum), DynamicEnum> XorCache = new Dictionary<(DynamicEnum, DynamicEnum), DynamicEnum>();
- public readonly Dictionary NegCache = new Dictionary();
-
- public void ClearCaches() {
- this.FlagCache.Clear();
- this.ParseCache.Clear();
- this.OrCache.Clear();
- this.AndCache.Clear();
- this.XorCache.Clear();
- this.NegCache.Clear();
- }
-
- }
-
- }
-}
diff --git a/MLEM.Data/Json/DynamicEnumConverter.cs b/MLEM.Data/Json/DynamicEnumConverter.cs
deleted file mode 100644
index 69fc81b..0000000
--- a/MLEM.Data/Json/DynamicEnumConverter.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using Newtonsoft.Json;
-
-namespace MLEM.Data.Json {
- ///
- /// Converts a to and from JSON
- ///
- [Obsolete("DynamicEnum has been moved into the DynamicEnums library: https://www.nuget.org/packages/DynamicEnums"), JsonConverter(typeof(DynamicEnumConverter))]
- public class DynamicEnumConverter : JsonConverter {
-
- /// Writes the JSON representation of the object.
- /// The to write to.
- /// The value.
- /// The calling serializer.
- public override void WriteJson(JsonWriter writer, DynamicEnum value, JsonSerializer serializer) {
- writer.WriteValue(value.ToString());
- }
-
- /// Reads the JSON representation of the object.
- /// The to read from.
- /// Type of the object.
- /// The existing value of object being read. If there is no existing value then null will be used.
- /// The existing value has a value.
- /// The calling serializer.
- /// The object value.
- public override DynamicEnum ReadJson(JsonReader reader, Type objectType, DynamicEnum existingValue, bool hasExistingValue, JsonSerializer serializer) {
- return DynamicEnum.Parse(objectType, reader.Value.ToString());
- }
-
- }
-}
diff --git a/MLEM.Data/Json/JsonConverters.cs b/MLEM.Data/Json/JsonConverters.cs
index f6fdace..77161c3 100644
--- a/MLEM.Data/Json/JsonConverters.cs
+++ b/MLEM.Data/Json/JsonConverters.cs
@@ -13,9 +13,6 @@ namespace MLEM.Data.Json {
///
public static readonly JsonConverter[] Converters = {
new Direction2Converter(),
-#pragma warning disable CS0618
- new DynamicEnumConverter(),
-#pragma warning restore CS0618
new PointConverter(),
new RectangleConverter(),
new RectangleFConverter(),
diff --git a/MLEM.Data/Json/JsonTypeSafeGenericDataHolder.cs b/MLEM.Data/Json/JsonTypeSafeGenericDataHolder.cs
index ebc1ae9..ef87d0d 100644
--- a/MLEM.Data/Json/JsonTypeSafeGenericDataHolder.cs
+++ b/MLEM.Data/Json/JsonTypeSafeGenericDataHolder.cs
@@ -19,12 +19,6 @@ namespace MLEM.Data.Json {
[JsonProperty]
private Dictionary data;
- ///
- [Obsolete("This method will be removed in a future update in favor of the generic SetData.")]
- public void SetData(string key, object data) {
- this.SetData