diff --git a/Capnp.Net.Runtime.Tests/RpcSchemaTests.cs b/Capnp.Net.Runtime.Tests/RpcSchemaTests.cs
index f8841ec..82ab2d0 100644
--- a/Capnp.Net.Runtime.Tests/RpcSchemaTests.cs
+++ b/Capnp.Net.Runtime.Tests/RpcSchemaTests.cs
@@ -1,5 +1,7 @@
using Capnp.Rpc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
namespace Capnp.Net.Runtime.Tests
{
@@ -366,5 +368,402 @@ namespace Capnp.Net.Runtime.Tests
Assert.AreEqual("reason", r.Unimplemented.Resolve.Exception.Reason);
}
}
+
+ void ConstructReconstructTest
(Func | construct, Action | verify)
+ where TD : class, ICapnpSerializable, new()
+ where TW: SerializerState, new()
+ {
+ var obj = construct();
+
+ var mb = MessageBuilder.Create();
+ var root = mb.BuildRoot();
+ obj.Serialize(root);
+ var d = (DeserializerState)root;
+ var obj2 = new TD();
+ obj2.Deserialize(d);
+
+ verify(obj2);
+ }
+
+ [TestMethod]
+ public void DcMessageAbort()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Abort = new Rpc.Exception()
+ {
+ Reason = "problem"
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Abort);
+ Assert.IsNull(msg.Accept);
+ Assert.AreEqual("problem", msg.Abort.Reason);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageAccept()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Accept = new Accept()
+ {
+ QuestionId = 123u,
+ Embargo = true
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Accept);
+ Assert.AreEqual(123u, msg.Accept.QuestionId);
+ Assert.IsTrue(msg.Accept.Embargo);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageUnimplementedJoin()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Unimplemented = new Message()
+ {
+ Join = new Join()
+ {
+ QuestionId = 456u,
+ Target = new MessageTarget()
+ {
+ ImportedCap = 789u
+ }
+ }
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Unimplemented);
+ Assert.IsNotNull(msg.Unimplemented.Join);
+ Assert.AreEqual(456u, msg.Unimplemented.Join.QuestionId);
+ Assert.IsNotNull(msg.Unimplemented.Join.Target);
+ Assert.AreEqual(789u, msg.Unimplemented.Join.Target.ImportedCap);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageCall()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Call = new Call()
+ {
+ AllowThirdPartyTailCall = true,
+ InterfaceId = 0x12345678abcdef,
+ MethodId = 0x5555,
+ Params = new Payload()
+ {
+ CapTable = new List()
+ {
+ new CapDescriptor()
+ {
+ ReceiverAnswer = new PromisedAnswer()
+ {
+ QuestionId = 42u,
+ Transform = new List()
+ {
+ new PromisedAnswer.Op()
+ {
+ GetPointerField = 3
+ }
+ }
+ },
+ },
+ new CapDescriptor()
+ {
+ ReceiverHosted = 7u
+ },
+ new CapDescriptor()
+ {
+ SenderHosted = 8u
+ },
+ new CapDescriptor()
+ {
+ SenderPromise = 9u
+ },
+ new CapDescriptor()
+ {
+ ThirdPartyHosted = new ThirdPartyCapDescriptor()
+ {
+ VineId = 10u
+ }
+ }
+ }
+ },
+ QuestionId = 57u,
+ SendResultsTo = new Call.sendResultsTo()
+ {
+ which = Call.sendResultsTo.WHICH.Caller
+ },
+ Target = new MessageTarget()
+ {
+ PromisedAnswer = new PromisedAnswer()
+ {
+ QuestionId = 12u
+ }
+ }
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Call);
+ Assert.IsTrue(msg.Call.AllowThirdPartyTailCall);
+ Assert.AreEqual(0x12345678abcdeful, msg.Call.InterfaceId);
+ Assert.AreEqual(0x5555u, msg.Call.MethodId);
+ Assert.IsNotNull(msg.Call.Params);
+ Assert.IsNotNull(msg.Call.Params.CapTable);
+ Assert.AreEqual(5, msg.Call.Params.CapTable.Count);
+ Assert.IsNotNull(msg.Call.Params.CapTable[0].ReceiverAnswer);
+ Assert.AreEqual(42u, msg.Call.Params.CapTable[0].ReceiverAnswer.QuestionId);
+ Assert.IsNotNull(msg.Call.Params.CapTable[0].ReceiverAnswer.Transform);
+ Assert.AreEqual(1, msg.Call.Params.CapTable[0].ReceiverAnswer.Transform.Count);
+ Assert.AreEqual((ushort)3, msg.Call.Params.CapTable[0].ReceiverAnswer.Transform[0].GetPointerField);
+ Assert.AreEqual(7u, msg.Call.Params.CapTable[1].ReceiverHosted);
+ Assert.AreEqual(8u, msg.Call.Params.CapTable[2].SenderHosted);
+ Assert.AreEqual(9u, msg.Call.Params.CapTable[3].SenderPromise);
+ Assert.IsNotNull(msg.Call.Params.CapTable[4].ThirdPartyHosted);
+ Assert.AreEqual(10u, msg.Call.Params.CapTable[4].ThirdPartyHosted.VineId);
+ Assert.AreEqual(57u, msg.Call.QuestionId);
+ Assert.IsNotNull(msg.Call.SendResultsTo);
+ Assert.AreEqual(Call.sendResultsTo.WHICH.Caller, msg.Call.SendResultsTo.which);
+ Assert.IsNotNull(msg.Call.Target);
+ Assert.IsNotNull(msg.Call.Target.PromisedAnswer);
+ Assert.AreEqual(12u, msg.Call.Target.PromisedAnswer.QuestionId);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageReturnResults()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Return = new Return()
+ {
+ AnswerId = 123u,
+ ReleaseParamCaps = false,
+ Results = new Payload()
+ {
+ CapTable = new List()
+ }
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Return);
+ Assert.AreEqual(123u, msg.Return.AnswerId);
+ Assert.IsFalse(msg.Return.ReleaseParamCaps);
+ Assert.IsNotNull(msg.Return.Results);
+ Assert.IsNotNull(msg.Return.Results.CapTable);
+ Assert.AreEqual(0, msg.Return.Results.CapTable.Count);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageReturnException()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Return = new Return()
+ {
+ AnswerId = 123u,
+ ReleaseParamCaps = true,
+ Exception = new Rpc.Exception()
+ {
+ Reason = "bad",
+ TheType = Rpc.Exception.Type.overloaded
+ }
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Return);
+ Assert.AreEqual(123u, msg.Return.AnswerId);
+ Assert.IsTrue(msg.Return.ReleaseParamCaps);
+ Assert.IsNotNull(msg.Return.Exception);
+ Assert.AreEqual("bad", msg.Return.Exception.Reason);
+ Assert.AreEqual(Rpc.Exception.Type.overloaded, msg.Return.Exception.TheType);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageReturnTakeFromOtherQuestion()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Return = new Return()
+ {
+ AnswerId = 123u,
+ ReleaseParamCaps = true,
+ TakeFromOtherQuestion = 321u
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Return);
+ Assert.AreEqual(123u, msg.Return.AnswerId);
+ Assert.IsTrue(msg.Return.ReleaseParamCaps);
+ Assert.AreEqual(321u, msg.Return.TakeFromOtherQuestion);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageFinish()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Finish = new Finish()
+ {
+ QuestionId = 321u,
+ ReleaseResultCaps = true
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Finish);
+ Assert.AreEqual(321u, msg.Finish.QuestionId);
+ Assert.IsTrue(msg.Finish.ReleaseResultCaps);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageResolve()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Resolve = new Resolve()
+ {
+ PromiseId = 555u,
+ Exception = new Rpc.Exception()
+ {
+ Reason = "error",
+ TheType = Rpc.Exception.Type.failed
+ }
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Resolve);
+ Assert.AreEqual(555u, msg.Resolve.PromiseId);
+ Assert.AreEqual("error", msg.Resolve.Exception.Reason);
+ Assert.AreEqual(Rpc.Exception.Type.failed, msg.Resolve.Exception.TheType);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageRelease()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Release = new Release()
+ {
+ Id = 6000u,
+ ReferenceCount = 6u
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Release);
+ Assert.AreEqual(6000u, msg.Release.Id);
+ Assert.AreEqual(6u, msg.Release.ReferenceCount);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageBootstrap()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Bootstrap = new Bootstrap()
+ {
+ QuestionId = 99u
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Bootstrap);
+ Assert.AreEqual(99u, msg.Bootstrap.QuestionId);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageProvide()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Provide = new Provide()
+ {
+ Target = new MessageTarget()
+ {
+ ImportedCap = 7u
+ }
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Provide);
+ Assert.IsNotNull(msg.Provide.Target);
+ Assert.AreEqual(7u, msg.Provide.Target.ImportedCap);
+ }
+ );
+ }
+
+ [TestMethod]
+ public void DcMessageDisembargo()
+ {
+ ConstructReconstructTest(
+ () => new Message()
+ {
+ Disembargo = new Disembargo()
+ {
+ Context = new Disembargo.context()
+ {
+ ReceiverLoopback = 900u
+ },
+ Target = new MessageTarget()
+ }
+ },
+ msg =>
+ {
+ Assert.IsNotNull(msg.Disembargo);
+ Assert.IsNotNull(msg.Disembargo.Context);
+ Assert.AreEqual(900u, msg.Disembargo.Context.ReceiverLoopback);
+ Assert.IsNotNull(msg.Disembargo.Target);
+ Assert.IsNull(msg.Disembargo.Target.ImportedCap);
+ Assert.IsNull(msg.Disembargo.Target.PromisedAnswer);
+ Assert.AreEqual(MessageTarget.WHICH.undefined, msg.Disembargo.Target.which);
+ }
+ );
+ }
}
}
diff --git a/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs b/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs
index 4edf578..ce0205a 100644
--- a/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs
+++ b/Capnp.Net.Runtime/Rpc/CapabilityReflection.cs
@@ -229,7 +229,7 @@ namespace Capnp.Rpc
}
///
- /// Checkes whether a given type qualifies as cpapbility interface./> on failure.
+ /// Checks whether a given type qualifies as cpapbility interface.
///
/// type to check
/// true when is a capability interface
diff --git a/Capnp.Net.Runtime/Rpc/PendingQuestion.cs b/Capnp.Net.Runtime/Rpc/PendingQuestion.cs
index 6d4f34c..b660d6d 100644
--- a/Capnp.Net.Runtime/Rpc/PendingQuestion.cs
+++ b/Capnp.Net.Runtime/Rpc/PendingQuestion.cs
@@ -165,7 +165,7 @@ namespace Capnp.Rpc
SetReturned();
}
- _tcs.TrySetException(new RpcException(exception.Reason));
+ _tcs.TrySetException(new RpcException(exception.Reason ?? "unknown reason"));
}
internal void OnException(System.Exception exception)
@@ -313,7 +313,7 @@ namespace Capnp.Rpc
}
var msg = (Message.WRITER)inParams!.MsgBuilder!.Root!;
- Debug.Assert(msg.Call.Target.which != MessageTarget.WHICH.undefined);
+ Debug.Assert(msg.Call!.Target.which != MessageTarget.WHICH.undefined);
var call = msg.Call;
call.QuestionId = QuestionId;
call.SendResultsTo.which = IsTailCall ?
diff --git a/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs b/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs
index e2a49ac..fd47935 100644
--- a/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs
+++ b/Capnp.Net.Runtime/Rpc/RemoteAnswerCapability.cs
@@ -101,7 +101,7 @@ namespace Capnp.Rpc
protected override void GetMessageTarget(MessageTarget.WRITER wr)
{
wr.which = MessageTarget.WHICH.PromisedAnswer;
- wr.PromisedAnswer.QuestionId = _question.QuestionId;
+ wr.PromisedAnswer!.QuestionId = _question.QuestionId;
_access.Serialize(wr.PromisedAnswer);
}
@@ -178,7 +178,7 @@ namespace Capnp.Rpc
var call = base.SetupMessage(args, interfaceId, methodId);
call.Target.which = MessageTarget.WHICH.PromisedAnswer;
- call.Target.PromisedAnswer.QuestionId = _question.QuestionId;
+ call.Target.PromisedAnswer!.QuestionId = _question.QuestionId;
_access.Serialize(call.Target.PromisedAnswer);
return call;
@@ -243,8 +243,8 @@ namespace Capnp.Rpc
if (endpoint == _ep)
{
writer.which = CapDescriptor.WHICH.ReceiverAnswer;
- _access.Serialize(writer.ReceiverAnswer);
- writer.ReceiverAnswer.QuestionId = _question.QuestionId;
+ _access.Serialize(writer.ReceiverAnswer!);
+ writer.ReceiverAnswer!.QuestionId = _question.QuestionId;
}
else if (_question.IsTailCall)
{
diff --git a/Capnp.Net.Runtime/Rpc/RemoteCapability.cs b/Capnp.Net.Runtime/Rpc/RemoteCapability.cs
index f198b29..1852c56 100644
--- a/Capnp.Net.Runtime/Rpc/RemoteCapability.cs
+++ b/Capnp.Net.Runtime/Rpc/RemoteCapability.cs
@@ -29,7 +29,7 @@ namespace Capnp.Rpc
callMsg.which = Message.WHICH.Call;
- var call = callMsg.Call;
+ var call = callMsg.Call!;
call.AllowThirdPartyTailCall = false;
call.InterfaceId = interfaceId;
call.MethodId = methodId;
diff --git a/Capnp.Net.Runtime/Rpc/RpcEngine.cs b/Capnp.Net.Runtime/Rpc/RpcEngine.cs
index 195fcd5..11c99b5 100644
--- a/Capnp.Net.Runtime/Rpc/RpcEngine.cs
+++ b/Capnp.Net.Runtime/Rpc/RpcEngine.cs
@@ -210,7 +210,7 @@ namespace Capnp.Rpc
var mb = MessageBuilder.Create();
var msg = mb.BuildRoot();
msg.which = Message.WHICH.Abort;
- msg.Abort.Reason = reason;
+ msg.Abort!.Reason = reason;
Tx(mb.Frame);
}
@@ -233,18 +233,18 @@ namespace Capnp.Rpc
var mb = MessageBuilder.Create();
var msg = mb.BuildRoot();
msg.which = Message.WHICH.Resolve;
- var resolve = msg.Resolve;
+ var resolve = msg.Resolve!;
try
{
var resolvedCap = resolvedCapGetter();
resolve.which = Resolve.WHICH.Cap;
- resolvedCap.Export(this, resolve.Cap);
+ resolvedCap.Export(this, resolve.Cap!);
}
catch (System.Exception ex)
{
resolve.which = Resolve.WHICH.Exception;
- resolve.Exception.Reason = ex.Message;
+ resolve.Exception!.Reason = ex.Message;
}
resolve.PromiseId = preliminaryId;
@@ -364,7 +364,7 @@ namespace Capnp.Rpc
var ans = bootstrap.MsgBuilder!.BuildRoot();
ans.which = Message.WHICH.Return;
- var ret = ans.Return;
+ var ret = ans.Return!;
ret.AnswerId = q;
Task bootstrapTask;
@@ -374,7 +374,7 @@ namespace Capnp.Rpc
{
ret.which = Return.WHICH.Results;
bootstrap.SetCapability(bootstrap.ProvideCapability(LocalCapability.Create(bootstrapCap)));
- ret.Results.Content = bootstrap;
+ ret.Results!.Content = bootstrap;
bootstrapTask = Task.FromResult(bootstrap);
}
@@ -383,7 +383,7 @@ namespace Capnp.Rpc
Logger.LogWarning("Peer asked for bootstrap capability, but no bootstrap capability was set.");
ret.which = Return.WHICH.Exception;
- ret.Exception.Reason = "No bootstrap capability present";
+ ret.Exception!.Reason = "No bootstrap capability present";
bootstrapTask = Task.FromException(new RpcException(ret.Exception.Reason));
}
@@ -403,7 +403,7 @@ namespace Capnp.Rpc
}
- if (bootstrapCap != null)
+ if (ret.Results != null)
{
ExportCapTableAndSend(bootstrap, ret.Results);
}
@@ -420,7 +420,7 @@ namespace Capnp.Rpc
{
var rmsg = mb.BuildRoot();
rmsg.which = Message.WHICH.Return;
- var ret = rmsg.Return;
+ var ret = rmsg.Return!;
ret.AnswerId = req.QuestionId;
return ret;
@@ -488,7 +488,7 @@ namespace Capnp.Rpc
{
case Call.sendResultsTo.WHICH.Caller:
ret.which = Return.WHICH.Results;
- ret.Results.Content = results.Rewrap();
+ ret.Results!.Content = results.Rewrap();
ret.ReleaseParamCaps = releaseParamCaps;
ExportCapTableAndSend(results, ret.Results);
pendingAnswer.CapTable = ret.Results.CapTable;
@@ -530,7 +530,7 @@ namespace Capnp.Rpc
ReturnCall(ret =>
{
ret.which = Return.WHICH.Exception;
- ret.Exception.Reason = exception.Message;
+ ret.Exception!.Reason = exception.Message;
ret.ReleaseParamCaps = releaseParamCaps;
});
}
@@ -824,7 +824,7 @@ namespace Capnp.Rpc
break;
case Resolve.WHICH.Exception:
- resolvableCap.Break(resolve.Exception.Reason);
+ resolvableCap.Break(resolve.Exception.Reason ?? "unknown reason");
break;
default:
@@ -844,8 +844,8 @@ namespace Capnp.Rpc
mb.InitCapTable();
var wr = mb.BuildRoot();
wr.which = Message.WHICH.Disembargo;
- wr.Disembargo.Context.which = Disembargo.context.WHICH.ReceiverLoopback;
- wr.Disembargo.Context.ReceiverLoopback = disembargo.Context.SenderLoopback;
+ wr.Disembargo!.Context.which = Disembargo.context.WHICH.ReceiverLoopback;
+ wr.Disembargo!.Context.ReceiverLoopback = disembargo.Context.SenderLoopback;
var reply = wr.Disembargo;
switch (disembargo.Target.which)
@@ -871,7 +871,7 @@ namespace Capnp.Rpc
var promisedAnswer = disembargo.Target.PromisedAnswer;
reply.Target.which = MessageTarget.WHICH.PromisedAnswer;
var replyPromisedAnswer = reply.Target.PromisedAnswer;
- replyPromisedAnswer.QuestionId = disembargo.Target.PromisedAnswer.QuestionId;
+ replyPromisedAnswer!.QuestionId = disembargo.Target.PromisedAnswer.QuestionId;
int count = promisedAnswer.Transform.Count;
replyPromisedAnswer.Transform.Init(count);
@@ -1162,7 +1162,7 @@ namespace Capnp.Rpc
var req = mb.BuildRoot();
req.which = Message.WHICH.Bootstrap;
var pendingBootstrap = AllocateQuestion(null, null);
- req.Bootstrap.QuestionId = pendingBootstrap.QuestionId;
+ req.Bootstrap!.QuestionId = pendingBootstrap.QuestionId;
Tx(mb.Frame);
@@ -1237,7 +1237,7 @@ namespace Capnp.Rpc
mb.InitCapTable();
var reply = mb.BuildRoot();
reply.which = Message.WHICH.Unimplemented;
- Reserializing.DeepCopy(msg, reply.Unimplemented.Rewrap());
+ Reserializing.DeepCopy(msg, reply.Unimplemented!.Rewrap());
Tx(mb.Frame);
}
@@ -1472,8 +1472,8 @@ namespace Capnp.Rpc
var mb = MessageBuilder.Create();
var msg = mb.BuildRoot();
msg.which = Message.WHICH.Finish;
- msg.Finish.QuestionId = questionId;
- msg.Finish.ReleaseResultCaps = false;
+ msg.Finish!.QuestionId = questionId;
+ msg.Finish!.ReleaseResultCaps = false;
try
{
@@ -1518,8 +1518,8 @@ namespace Capnp.Rpc
var mb = MessageBuilder.Create();
var msg = mb.BuildRoot();
msg.which = Message.WHICH.Release;
- msg.Release.Id = importId;
- msg.Release.ReferenceCount = (uint)count;
+ msg.Release!.Id = importId;
+ msg.Release!.ReferenceCount = (uint)count;
try
{
@@ -1540,7 +1540,7 @@ namespace Capnp.Rpc
mb.InitCapTable();
var msg = mb.BuildRoot();
msg.which = Message.WHICH.Disembargo;
- describe(msg.Disembargo.Target);
+ describe(msg.Disembargo!.Target);
var ctx = msg.Disembargo.Context;
ctx.which = Disembargo.context.WHICH.SenderLoopback;
ctx.SenderLoopback = id;
diff --git a/Capnp.Net.Runtime/Rpc/rpc.cs b/Capnp.Net.Runtime/Rpc/rpc.cs
index 066bd98..632c62e 100644
--- a/Capnp.Net.Runtime/Rpc/rpc.cs
+++ b/Capnp.Net.Runtime/Rpc/rpc.cs
@@ -1,17 +1,19 @@
#pragma warning disable CS1591
-#nullable disable
using Capnp;
using Capnp.Rpc;
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
namespace Capnp.Rpc
{
+ [TypeId(0x91b79f1f808db032UL)]
public class Message : ICapnpSerializable
{
+ public const UInt64 typeId = 0x91b79f1f808db032UL;
public enum WHICH : ushort
{
Unimplemented = 0,
@@ -58,13 +60,13 @@ namespace Capnp.Rpc
Release = CapnpSerializable.Create(reader.Release);
break;
case WHICH.ObsoleteSave:
- ObsoleteSave = CapnpSerializable.Create(reader.ObsoleteSave);
+ ObsoleteSave = CapnpSerializable.Create |