/// <summary> /// FromJson /// </summary> /// <param name="sessionDevices"></param> /// <param name="json"></param> public static void FromJson(this EltraDeviceSet sessionDevices, string json) { if (sessionDevices == null) { throw new ArgumentNullException(nameof(sessionDevices)); } sessionDevices = TryDeserializeObject <EltraDeviceSet>(json); }
/// <summary> /// ToJson /// </summary> /// <param name="sessionDevices"></param> /// <returns></returns> public static string ToJson(this EltraDeviceSet sessionDevices) { return(JsonSerializer.Serialize(sessionDevices)); }