public static void FromJsonArrayToEnumArray <TEnum>(IVOSJsonArray jarr, TEnum[] arr) { for (int i = 0; i < jarr.count; ++i) { arr[i] = (TEnum)System.Enum.Parse( typeof(TEnum), jarr.GetStringItem(i)); } }
public static void FromJsonArrayToEnumCollection <TEnum>(IVOSJsonArray jarr, ICollection <TEnum> coll) { for (int i = 0; i < jarr.count; ++i) { coll.Add((TEnum)System.Enum.Parse( typeof(TEnum), jarr.GetStringItem(i))); } }
public static void FromJsonArrayToArray(IVOSJsonArray jarr, string[] arr) { string val = string.Empty; for (int i = 0; i < jarr.count; ++i) { val = jarr.GetStringItem(i); arr[i] = val; } }