@@ -26,6 +26,11 @@ public static class SerializationExtensions
2626 /// <exception cref="T:System.ArgumentNullException"><paramref name="graph"/> is <see langword="null"/>.</exception>
2727 /// <exception cref="T:System.ArgumentNullException"><paramref name="stream"/> is <see langword="null"/>.</exception>
2828 /// <exception cref="T:System.ArgumentException"><paramref name="stream"/> is not writable.</exception>
29+ #if DEPRECATE_BINARY_SERIALIZATION
30+ [ Obsolete (
31+ "Binary serialization on old .NET targets is deprecated.\n " +
32+ "Consider using another kind of serialization or updating to at least .NET Framework 4.6.1+, .NET Standard 2.0+ or .NET 5.0+." ) ]
33+ #endif
2934 public static void SerializeToBinary < TVertex , TEdge > (
3035 [ NotNull ] this IGraph < TVertex , TEdge > graph ,
3136 [ NotNull ] Stream stream )
@@ -61,6 +66,11 @@ public static void SerializeToBinary<TVertex, TEdge>(
6166 /// <exception cref="T:System.ArgumentNullException"><paramref name="stream"/> is <see langword="null"/>.</exception>
6267 /// <exception cref="T:System.ArgumentException"><paramref name="stream"/> is not readable.</exception>
6368 [ Pure ]
69+ #if DEPRECATE_BINARY_SERIALIZATION
70+ [ Obsolete (
71+ "Binary deserialization on old .NET targets is deprecated.\n " +
72+ "Consider using another kind of serialization or updating to at least .NET Framework 4.6.1+, .NET Standard 2.0+ or .NET 5.0+." ) ]
73+ #endif
6474 public static TGraph DeserializeFromBinary < TVertex , TEdge , TGraph > (
6575 [ NotNull ] this Stream stream ,
6676 [ CanBeNull ] SerializationBinder binder = null )
0 commit comments