|
@@ -262,6 +262,16 @@ namespace InABox.Core
|
|
/// </remarks>
|
|
/// </remarks>
|
|
public class BinarySerializationSettings
|
|
public class BinarySerializationSettings
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// Should the Info() call return RPC and Rest Ports? This is
|
|
|
|
+ /// To workaround a bug in RPCsockets that crash on large uploads
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <remarks>
|
|
|
|
+ /// True in all serialization versions >= 1.2
|
|
|
|
+ /// </remarks>
|
|
|
|
+ public bool RPCClientWorkaround { get; set; }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Should reference types include a flag for nullability? (Adds an extra boolean field for whether the value is null or not).
|
|
/// Should reference types include a flag for nullability? (Adds an extra boolean field for whether the value is null or not).
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -269,23 +279,36 @@ namespace InABox.Core
|
|
/// True in all serialisation versions >= 1.1.
|
|
/// True in all serialisation versions >= 1.1.
|
|
/// </remarks>
|
|
/// </remarks>
|
|
public bool IncludeNullables { get; set; }
|
|
public bool IncludeNullables { get; set; }
|
|
|
|
+
|
|
public string Version { get; set; }
|
|
public string Version { get; set; }
|
|
|
|
|
|
- public static BinarySerializationSettings Latest => V1_1;
|
|
|
|
|
|
+ public static BinarySerializationSettings Latest => V1_2;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
public static BinarySerializationSettings V1_0 = new BinarySerializationSettings("1.0")
|
|
public static BinarySerializationSettings V1_0 = new BinarySerializationSettings("1.0")
|
|
{
|
|
{
|
|
- IncludeNullables = false
|
|
|
|
|
|
+ IncludeNullables = false,
|
|
|
|
+ RPCClientWorkaround = false
|
|
};
|
|
};
|
|
|
|
+
|
|
public static BinarySerializationSettings V1_1 = new BinarySerializationSettings("1.1")
|
|
public static BinarySerializationSettings V1_1 = new BinarySerializationSettings("1.1")
|
|
{
|
|
{
|
|
- IncludeNullables = true
|
|
|
|
|
|
+ IncludeNullables = true,
|
|
|
|
+ RPCClientWorkaround = false
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ public static BinarySerializationSettings V1_2 = new BinarySerializationSettings("1.2")
|
|
|
|
+ {
|
|
|
|
+ IncludeNullables = true,
|
|
|
|
+ RPCClientWorkaround = true
|
|
};
|
|
};
|
|
|
|
|
|
public static BinarySerializationSettings ConvertVersionString(string version) => version switch
|
|
public static BinarySerializationSettings ConvertVersionString(string version) => version switch
|
|
{
|
|
{
|
|
"1.0" => V1_0,
|
|
"1.0" => V1_0,
|
|
"1.1" => V1_1,
|
|
"1.1" => V1_1,
|
|
|
|
+ "1.2" => V1_2,
|
|
_ => V1_0
|
|
_ => V1_0
|
|
};
|
|
};
|
|
|
|
|