Closed tofutim closed 6 years ago
Interested in adding enums? I've been using this.
public static TEnum GetEnumValueOrDefault<TEnum>(this ISettings settings, TEnum defaultValue, string fileName = null) where TEnum : struct { TEnum result = default(TEnum); bool enumParseResult = false; var strTarget = settings.GetValueOrDefault(nameof(TEnum), defaultValue.ToString(), fileName); enumParseResult = Enum.TryParse(strTarget, true, out result); return result; } public static bool AddOrUpdateEnumValue<TEnum>(this ISettings settings, TEnum value, string fileName = null) { return settings.AddOrUpdateValue(nameof(TEnum), value.ToString(), fileName); }
Each platform does not handle Enums. You can parse to Int and save that or yourself. The plugin will not handle this.
Interested in adding enums? I've been using this.