Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Bring back original TransferDataSource API and mark it obsolete.
Browse files Browse the repository at this point in the history
  • Loading branch information
sevoku committed Feb 17, 2023
1 parent 327e01e commit 45e47b6
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions Xwt/Xwt/TransferDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,30 @@ public static byte[] SerializeValue (object val, Type type)
public static object DeserializeValue (byte[] data, Type type)
{
return JsonSerializer.Deserialize (data, type);
}
}
}

/// <summary>
/// Serializes a value to a byte array using <see cref="System.Runtime.Serialization.Formatters.Binary.BinaryFormatter"/> .
/// </summary>
/// <returns>The serialized value.</returns>
/// <param name="val">The value to serialize.</param>
[Obsolete("Use SerializeValue (object val, Type type) instead", true)]
public static byte[] SerializeValue(object val)
{
return new byte[0];
}

/// <summary>
/// Deserializes a value from a byte array.
/// </summary>
/// <returns>The deserialized value.</returns>
/// <param name="data">The byte array containing the serialized value.</param>
[Obsolete("Use DeserializeValue (byte[] data, Type type) instead", true)]
public static object DeserializeValue(byte[] data)
{
return null;
}
}

/// <summary>
/// Data request delegate, returns the data for a specific transfer data type request.
Expand Down

0 comments on commit 45e47b6

Please sign in to comment.