mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 14:51:41 +01:00
Issue #25
This commit is contained in:
parent
be41885ac8
commit
9e63e194bb
@ -16,6 +16,7 @@
|
||||
<Compile Include="..\Capnp.Net.Runtime.Tests\General.cs" Link="General.cs" />
|
||||
<Compile Include="..\Capnp.Net.Runtime.Tests\Issue19.cs" Link="Issue19.cs" />
|
||||
<Compile Include="..\Capnp.Net.Runtime.Tests\Issue20.cs" Link="Issue20.cs" />
|
||||
<Compile Include="..\Capnp.Net.Runtime.Tests\Issue25.cs" Link="Issue25.cs" />
|
||||
<Compile Include="..\Capnp.Net.Runtime.Tests\JobUtil.cs" Link="JobUtil.cs" />
|
||||
<Compile Include="..\Capnp.Net.Runtime.Tests\MessageBuilderTests.cs" Link="MessageBuilderTests.cs" />
|
||||
<Compile Include="..\Capnp.Net.Runtime.Tests\ProvidedCapabilityMock.cs" Link="ProvidedCapabilityMock.cs" />
|
||||
|
890
Capnp.Net.Runtime.Tests/Issue25.cs
Normal file
890
Capnp.Net.Runtime.Tests/Issue25.cs
Normal file
@ -0,0 +1,890 @@
|
||||
using Capnp;
|
||||
using Capnp.Rpc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapnpGen
|
||||
{
|
||||
[TypeId(0xb09c1336dc3ea94eUL), Proxy(typeof(Issue25A_Proxy)), Skeleton(typeof(Issue25A_Skeleton))]
|
||||
public interface IIssue25A : IDisposable
|
||||
{
|
||||
Task<long> MethodA(CancellationToken cancellationToken_ = default);
|
||||
}
|
||||
|
||||
public class Issue25A_Proxy : Proxy, IIssue25A
|
||||
{
|
||||
public async Task<long> MethodA(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<CapnpGen.Issue25A.Params_methodA.WRITER>();
|
||||
var arg_ = new CapnpGen.Issue25A.Params_methodA()
|
||||
{ };
|
||||
arg_.serialize(in_);
|
||||
var d_ = await Call(12726067773386434894UL, 0, in_.Rewrap<DynamicSerializerState>(), false, cancellationToken_).WhenReturned;
|
||||
var r_ = CapnpSerializable.Create<CapnpGen.Issue25A.Result_methodA>(d_);
|
||||
return (r_.Result);
|
||||
}
|
||||
}
|
||||
|
||||
public class Issue25A_Skeleton : Skeleton<IIssue25A>
|
||||
{
|
||||
public Issue25A_Skeleton()
|
||||
{
|
||||
SetMethodTable(MethodA);
|
||||
}
|
||||
|
||||
public override ulong InterfaceId => 12726067773386434894UL;
|
||||
Task<AnswerOrCounterquestion> MethodA(DeserializerState d_, CancellationToken cancellationToken_)
|
||||
{
|
||||
return Impatient.MaybeTailCall(Impl.MethodA(cancellationToken_), result =>
|
||||
{
|
||||
var s_ = SerializerState.CreateForRpc<CapnpGen.Issue25A.Result_methodA.WRITER>();
|
||||
var r_ = new CapnpGen.Issue25A.Result_methodA { Result = result };
|
||||
r_.serialize(s_);
|
||||
return s_;
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Issue25A
|
||||
{
|
||||
[TypeId(0x994fd8d48f77e57cUL)]
|
||||
public class Params_methodA : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0x994fd8d48f77e57cUL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0xf504d63e26c4db14UL)]
|
||||
public class Result_methodA : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0xf504d63e26c4db14UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
Result = reader.Result;
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
writer.Result = Result;
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public long Result
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public long Result => ctx.ReadDataLong(0UL, 0L);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(1, 0);
|
||||
}
|
||||
|
||||
public long Result
|
||||
{
|
||||
get => this.ReadDataLong(0UL, 0L);
|
||||
set => this.WriteData(0UL, value, 0L);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0x9a5c2572c0400979UL), Proxy(typeof(CapHolder_Proxy<>)), Skeleton(typeof(CapHolder_Skeleton<>))]
|
||||
public interface ICapHolder<TCapType> : IDisposable where TCapType : class
|
||||
{
|
||||
Task<TCapType> Cap(CancellationToken cancellationToken_ = default);
|
||||
}
|
||||
|
||||
public class CapHolder_Proxy<TCapType> : Proxy, ICapHolder<TCapType> where TCapType : class
|
||||
{
|
||||
public Task<TCapType> Cap(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<CapnpGen.CapHolder<TCapType>.Params_cap.WRITER>();
|
||||
var arg_ = new CapnpGen.CapHolder<TCapType>.Params_cap()
|
||||
{ };
|
||||
arg_.serialize(in_);
|
||||
return Impatient.MakePipelineAware(Call(11122806354480204153UL, 0, in_.Rewrap<DynamicSerializerState>(), false, cancellationToken_), d_ =>
|
||||
{
|
||||
var r_ = CapnpSerializable.Create<CapnpGen.CapHolder<TCapType>.Result_cap>(d_);
|
||||
return (r_.Cap);
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public class CapHolder_Skeleton<TCapType> : Skeleton<ICapHolder<TCapType>> where TCapType : class
|
||||
{
|
||||
public CapHolder_Skeleton()
|
||||
{
|
||||
SetMethodTable(Cap);
|
||||
}
|
||||
|
||||
public override ulong InterfaceId => 11122806354480204153UL;
|
||||
Task<AnswerOrCounterquestion> Cap(DeserializerState d_, CancellationToken cancellationToken_)
|
||||
{
|
||||
return Impatient.MaybeTailCall(Impl.Cap(cancellationToken_), cap =>
|
||||
{
|
||||
var s_ = SerializerState.CreateForRpc<CapnpGen.CapHolder<TCapType>.Result_cap.WRITER>();
|
||||
var r_ = new CapnpGen.CapHolder<TCapType>.Result_cap { Cap = cap };
|
||||
r_.serialize(s_);
|
||||
return s_;
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CapHolder<TCapType>
|
||||
where TCapType : class
|
||||
{
|
||||
[TypeId(0x9fb50287386a4515UL)]
|
||||
public class Params_cap : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0x9fb50287386a4515UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0x9b3a7a5298aae998UL)]
|
||||
public class Result_cap : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0x9b3a7a5298aae998UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
Cap = CapnpSerializable.Create<TCapType>(reader.Cap);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
writer.Cap.SetObject(Cap);
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public TCapType Cap
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public DeserializerState Cap => ctx.StructReadPointer(0);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 1);
|
||||
}
|
||||
|
||||
public DynamicSerializerState Cap
|
||||
{
|
||||
get => BuildPointer<DynamicSerializerState>(0);
|
||||
set => Link(0, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0xc210c6a49d79653cUL), Proxy(typeof(CapHolderA_Proxy)), Skeleton(typeof(CapHolderA_Skeleton))]
|
||||
public interface ICapHolderA : IDisposable
|
||||
{
|
||||
Task<CapnpGen.IIssue25A> Cap(CancellationToken cancellationToken_ = default);
|
||||
}
|
||||
|
||||
public class CapHolderA_Proxy : Proxy, ICapHolderA
|
||||
{
|
||||
public Task<CapnpGen.IIssue25A> Cap(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<CapnpGen.CapHolderA.Params_cap.WRITER>();
|
||||
var arg_ = new CapnpGen.CapHolderA.Params_cap()
|
||||
{ };
|
||||
arg_.serialize(in_);
|
||||
return Impatient.MakePipelineAware(Call(13983895253304304956UL, 0, in_.Rewrap<DynamicSerializerState>(), false, cancellationToken_), d_ =>
|
||||
{
|
||||
var r_ = CapnpSerializable.Create<CapnpGen.CapHolderA.Result_cap>(d_);
|
||||
return (r_.Cap);
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public class CapHolderA_Skeleton : Skeleton<ICapHolderA>
|
||||
{
|
||||
public CapHolderA_Skeleton()
|
||||
{
|
||||
SetMethodTable(Cap);
|
||||
}
|
||||
|
||||
public override ulong InterfaceId => 13983895253304304956UL;
|
||||
Task<AnswerOrCounterquestion> Cap(DeserializerState d_, CancellationToken cancellationToken_)
|
||||
{
|
||||
return Impatient.MaybeTailCall(Impl.Cap(cancellationToken_), cap =>
|
||||
{
|
||||
var s_ = SerializerState.CreateForRpc<CapnpGen.CapHolderA.Result_cap.WRITER>();
|
||||
var r_ = new CapnpGen.CapHolderA.Result_cap { Cap = cap };
|
||||
r_.serialize(s_);
|
||||
return s_;
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CapHolderA
|
||||
{
|
||||
[TypeId(0xfa15f780f3b1df22UL)]
|
||||
public class Params_cap : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0xfa15f780f3b1df22UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0xc2166ff01687f001UL)]
|
||||
public class Result_cap : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0xc2166ff01687f001UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
Cap = reader.Cap;
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
writer.Cap = Cap;
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public CapnpGen.IIssue25A Cap
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public CapnpGen.IIssue25A Cap => ctx.ReadCap<CapnpGen.IIssue25A>(0);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 1);
|
||||
}
|
||||
|
||||
public CapnpGen.IIssue25A Cap
|
||||
{
|
||||
get => ReadCap<CapnpGen.IIssue25A>(0);
|
||||
set => LinkObject(0, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0xf567e74a1a5cbd2dUL), Proxy(typeof(Issue25B_Proxy)), Skeleton(typeof(Issue25B_Skeleton))]
|
||||
public interface IIssue25B : IDisposable
|
||||
{
|
||||
Task<CapnpGen.ICapHolder<object>> GetAinCapHolderAnyPointer(CancellationToken cancellationToken_ = default);
|
||||
Task<CapnpGen.ICapHolder<CapnpGen.IIssue25A>> GetAinCapHolderGenericA(CancellationToken cancellationToken_ = default);
|
||||
Task<CapnpGen.ICapHolderA> GetAinCapHolderNonGenericA(CancellationToken cancellationToken_ = default);
|
||||
}
|
||||
|
||||
public class Issue25B_Proxy : Proxy, IIssue25B
|
||||
{
|
||||
public Task<CapnpGen.ICapHolder<object>> GetAinCapHolderAnyPointer(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<CapnpGen.Issue25B.Params_getAinCapHolderAnyPointer.WRITER>();
|
||||
var arg_ = new CapnpGen.Issue25B.Params_getAinCapHolderAnyPointer()
|
||||
{ };
|
||||
arg_.serialize(in_);
|
||||
return Impatient.MakePipelineAware(Call(17683356767349423405UL, 0, in_.Rewrap<DynamicSerializerState>(), false, cancellationToken_), d_ =>
|
||||
{
|
||||
var r_ = CapnpSerializable.Create<CapnpGen.Issue25B.Result_getAinCapHolderAnyPointer>(d_);
|
||||
return (r_.AInCapHolder);
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
public Task<CapnpGen.ICapHolder<CapnpGen.IIssue25A>> GetAinCapHolderGenericA(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<CapnpGen.Issue25B.Params_getAinCapHolderGenericA.WRITER>();
|
||||
var arg_ = new CapnpGen.Issue25B.Params_getAinCapHolderGenericA()
|
||||
{ };
|
||||
arg_.serialize(in_);
|
||||
return Impatient.MakePipelineAware(Call(17683356767349423405UL, 1, in_.Rewrap<DynamicSerializerState>(), false, cancellationToken_), d_ =>
|
||||
{
|
||||
var r_ = CapnpSerializable.Create<CapnpGen.Issue25B.Result_getAinCapHolderGenericA>(d_);
|
||||
return (r_.AInCapHolder);
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
public Task<CapnpGen.ICapHolderA> GetAinCapHolderNonGenericA(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<CapnpGen.Issue25B.Params_getAinCapHolderNonGenericA.WRITER>();
|
||||
var arg_ = new CapnpGen.Issue25B.Params_getAinCapHolderNonGenericA()
|
||||
{ };
|
||||
arg_.serialize(in_);
|
||||
return Impatient.MakePipelineAware(Call(17683356767349423405UL, 2, in_.Rewrap<DynamicSerializerState>(), false, cancellationToken_), d_ =>
|
||||
{
|
||||
var r_ = CapnpSerializable.Create<CapnpGen.Issue25B.Result_getAinCapHolderNonGenericA>(d_);
|
||||
return (r_.AInCapHolder);
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public class Issue25B_Skeleton : Skeleton<IIssue25B>
|
||||
{
|
||||
public Issue25B_Skeleton()
|
||||
{
|
||||
SetMethodTable(GetAinCapHolderAnyPointer, GetAinCapHolderGenericA, GetAinCapHolderNonGenericA);
|
||||
}
|
||||
|
||||
public override ulong InterfaceId => 17683356767349423405UL;
|
||||
Task<AnswerOrCounterquestion> GetAinCapHolderAnyPointer(DeserializerState d_, CancellationToken cancellationToken_)
|
||||
{
|
||||
return Impatient.MaybeTailCall(Impl.GetAinCapHolderAnyPointer(cancellationToken_), aInCapHolder =>
|
||||
{
|
||||
var s_ = SerializerState.CreateForRpc<CapnpGen.Issue25B.Result_getAinCapHolderAnyPointer.WRITER>();
|
||||
var r_ = new CapnpGen.Issue25B.Result_getAinCapHolderAnyPointer { AInCapHolder = aInCapHolder };
|
||||
r_.serialize(s_);
|
||||
return s_;
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
Task<AnswerOrCounterquestion> GetAinCapHolderGenericA(DeserializerState d_, CancellationToken cancellationToken_)
|
||||
{
|
||||
return Impatient.MaybeTailCall(Impl.GetAinCapHolderGenericA(cancellationToken_), aInCapHolder =>
|
||||
{
|
||||
var s_ = SerializerState.CreateForRpc<CapnpGen.Issue25B.Result_getAinCapHolderGenericA.WRITER>();
|
||||
var r_ = new CapnpGen.Issue25B.Result_getAinCapHolderGenericA { AInCapHolder = aInCapHolder };
|
||||
r_.serialize(s_);
|
||||
return s_;
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
Task<AnswerOrCounterquestion> GetAinCapHolderNonGenericA(DeserializerState d_, CancellationToken cancellationToken_)
|
||||
{
|
||||
return Impatient.MaybeTailCall(Impl.GetAinCapHolderNonGenericA(cancellationToken_), aInCapHolder =>
|
||||
{
|
||||
var s_ = SerializerState.CreateForRpc<CapnpGen.Issue25B.Result_getAinCapHolderNonGenericA.WRITER>();
|
||||
var r_ = new CapnpGen.Issue25B.Result_getAinCapHolderNonGenericA { AInCapHolder = aInCapHolder };
|
||||
r_.serialize(s_);
|
||||
return s_;
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Issue25B
|
||||
{
|
||||
[TypeId(0xe8d098fdc4452255UL)]
|
||||
public class Params_getAinCapHolderAnyPointer : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0xe8d098fdc4452255UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0xf3e141366136b72aUL)]
|
||||
public class Result_getAinCapHolderAnyPointer : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0xf3e141366136b72aUL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AInCapHolder = reader.AInCapHolder;
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
writer.AInCapHolder = AInCapHolder;
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public CapnpGen.ICapHolder<object> AInCapHolder
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public CapnpGen.ICapHolder<object> AInCapHolder => ctx.ReadCap<CapnpGen.ICapHolder<object>>(0);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 1);
|
||||
}
|
||||
|
||||
public CapnpGen.ICapHolder<object> AInCapHolder
|
||||
{
|
||||
get => ReadCap<CapnpGen.ICapHolder<object>>(0);
|
||||
set => LinkObject(0, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0x97b7893bbafbac9cUL)]
|
||||
public class Params_getAinCapHolderGenericA : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0x97b7893bbafbac9cUL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0xca0d4d05609cf941UL)]
|
||||
public class Result_getAinCapHolderGenericA : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0xca0d4d05609cf941UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AInCapHolder = reader.AInCapHolder;
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
writer.AInCapHolder = AInCapHolder;
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public CapnpGen.ICapHolder<CapnpGen.IIssue25A> AInCapHolder
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public CapnpGen.ICapHolder<CapnpGen.IIssue25A> AInCapHolder => ctx.ReadCap<CapnpGen.ICapHolder<CapnpGen.IIssue25A>>(0);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 1);
|
||||
}
|
||||
|
||||
public CapnpGen.ICapHolder<CapnpGen.IIssue25A> AInCapHolder
|
||||
{
|
||||
get => ReadCap<CapnpGen.ICapHolder<CapnpGen.IIssue25A>>(0);
|
||||
set => LinkObject(0, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0xda5cc8f4689eb99fUL)]
|
||||
public class Params_getAinCapHolderNonGenericA : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0xda5cc8f4689eb99fUL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TypeId(0x81a8e7a60710b811UL)]
|
||||
public class Result_getAinCapHolderNonGenericA : ICapnpSerializable
|
||||
{
|
||||
public const UInt64 typeId = 0x81a8e7a60710b811UL;
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AInCapHolder = reader.AInCapHolder;
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
public void serialize(WRITER writer)
|
||||
{
|
||||
writer.AInCapHolder = AInCapHolder;
|
||||
}
|
||||
|
||||
void ICapnpSerializable.Serialize(SerializerState arg_)
|
||||
{
|
||||
serialize(arg_.Rewrap<WRITER>());
|
||||
}
|
||||
|
||||
public void applyDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
public CapnpGen.ICapHolderA AInCapHolder
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public struct READER
|
||||
{
|
||||
readonly DeserializerState ctx;
|
||||
public READER(DeserializerState ctx)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
public static READER create(DeserializerState ctx) => new READER(ctx);
|
||||
public static implicit operator DeserializerState(READER reader) => reader.ctx;
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public CapnpGen.ICapHolderA AInCapHolder => ctx.ReadCap<CapnpGen.ICapHolderA>(0);
|
||||
}
|
||||
|
||||
public class WRITER : SerializerState
|
||||
{
|
||||
public WRITER()
|
||||
{
|
||||
this.SetStruct(0, 1);
|
||||
}
|
||||
|
||||
public CapnpGen.ICapHolderA AInCapHolder
|
||||
{
|
||||
get => ReadCap<CapnpGen.ICapHolderA>(0);
|
||||
set => LinkObject(0, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -143,5 +143,34 @@ namespace Capnp.Net.Runtime.Tests
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Issue25()
|
||||
{
|
||||
using (var server = SetupServer())
|
||||
{
|
||||
server.Main = new Issue25BImpl();
|
||||
|
||||
using (var client = SetupClient())
|
||||
{
|
||||
client.WhenConnected.Wait();
|
||||
|
||||
using (var main = client.GetMain<CapnpGen.IIssue25B>())
|
||||
{
|
||||
var capholderAPT = main.GetAinCapHolderAnyPointer();
|
||||
Assert.IsTrue(capholderAPT.Wait(MediumNonDbgTimeout));
|
||||
var capholderAP = capholderAPT.Result;
|
||||
var capAPT = capholderAP.Cap();
|
||||
Assert.IsTrue(capAPT.Wait(MediumNonDbgTimeout));
|
||||
using (var a = ((BareProxy)capAPT.Result).Cast<CapnpGen.IIssue25A>(true))
|
||||
{
|
||||
var r = a.MethodA();
|
||||
Assert.IsTrue(r.Wait(MediumNonDbgTimeout));
|
||||
Assert.AreEqual(123L, r.Result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Capnproto_test.Capnp.Test;
|
||||
using CapnpGen;
|
||||
|
||||
namespace Capnp.Net.Runtime.Tests.GenImpls
|
||||
{
|
||||
@ -500,7 +501,7 @@ namespace Capnp.Net.Runtime.Tests.GenImpls
|
||||
return ("bar", new TestPipeline.Box() { Cap = new TestExtendsImpl(_counters) });
|
||||
}
|
||||
|
||||
public Task TestPointers(ITestInterface cap, AnyPointer obj, IReadOnlyList<ITestInterface> list, CancellationToken cancellationToken_)
|
||||
public Task TestPointers(ITestInterface cap, object obj, IReadOnlyList<ITestInterface> list, CancellationToken cancellationToken_)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
@ -776,4 +777,83 @@ namespace Capnp.Net.Runtime.Tests.GenImpls
|
||||
}
|
||||
}
|
||||
#endregion B2
|
||||
|
||||
#region Issue25
|
||||
|
||||
class Issue25AImpl : CapnpGen.IIssue25A
|
||||
{
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public Task<long> MethodA(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
return Task.FromResult(123L);
|
||||
}
|
||||
}
|
||||
|
||||
class CapHolderImpl<T> : CapnpGen.ICapHolder<T>
|
||||
where T: class
|
||||
{
|
||||
T _cap;
|
||||
|
||||
public CapHolderImpl(T cap)
|
||||
{
|
||||
_cap = cap;
|
||||
}
|
||||
|
||||
public Task<T> Cap(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
return Task.FromResult(_cap);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class CapHolderAImpl : CapnpGen.ICapHolderA
|
||||
{
|
||||
IIssue25A _a;
|
||||
|
||||
public CapHolderAImpl(IIssue25A a)
|
||||
{
|
||||
_a = a;
|
||||
}
|
||||
|
||||
public Task<IIssue25A> Cap(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
return Task.FromResult(_a);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class Issue25BImpl : CapnpGen.IIssue25B
|
||||
{
|
||||
Issue25AImpl _a = new Issue25AImpl();
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public Task<ICapHolder<object>> GetAinCapHolderAnyPointer(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
return Task.FromResult<ICapHolder<object>>(new CapHolderImpl<object>(_a));
|
||||
}
|
||||
|
||||
public Task<ICapHolder<IIssue25A>> GetAinCapHolderGenericA(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
return Task.FromResult<ICapHolder<IIssue25A>>(new CapHolderImpl<CapnpGen.IIssue25A>(_a));
|
||||
}
|
||||
|
||||
public Task<ICapHolderA> GetAinCapHolderNonGenericA(CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
return Task.FromResult<ICapHolderA>(new CapHolderAImpl(_a));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -1223,7 +1223,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AnyPointerField = CapnpSerializable.Create<AnyPointer>(reader.AnyPointerField);
|
||||
AnyPointerField = CapnpSerializable.Create<object>(reader.AnyPointerField);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
@ -1241,7 +1241,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
}
|
||||
|
||||
public AnyPointer AnyPointerField
|
||||
public object AnyPointerField
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -1283,7 +1283,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AnyStructField = CapnpSerializable.Create<AnyPointer>(reader.AnyStructField);
|
||||
AnyStructField = CapnpSerializable.Create<object>(reader.AnyStructField);
|
||||
AnyListField = reader.AnyListField.ToReadOnlyList(_ => (object)_);
|
||||
CapabilityField = reader.CapabilityField;
|
||||
applyDefaults();
|
||||
@ -1305,7 +1305,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
}
|
||||
|
||||
public AnyPointer AnyStructField
|
||||
public object AnyStructField
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -8866,7 +8866,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
var reader = READER.create(arg_);
|
||||
Foo = CapnpSerializable.Create<TFoo>(reader.Foo);
|
||||
Inner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner>(reader.Inner);
|
||||
Inner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>>(reader.Inner2);
|
||||
Inner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>>(reader.Inner2);
|
||||
Inner2Bind = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>>(reader.Inner2Bind);
|
||||
Inner2Text = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>>(reader.Inner2Text);
|
||||
RevFoo = CapnpSerializable.Create<TBar>(reader.RevFoo);
|
||||
@ -8904,7 +8904,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer> Inner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object> Inner2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -8941,7 +8941,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public DeserializerState Foo => ctx.StructReadPointer(0);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner.READER Inner => ctx.ReadStruct(1, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.READER Inner2 => ctx.ReadStruct(2, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.READER Inner2 => ctx.ReadStruct(2, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER Inner2Bind => ctx.ReadStruct(3, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER Inner2Text => ctx.ReadStruct(4, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER.create);
|
||||
public DeserializerState RevFoo => ctx.StructReadPointer(5);
|
||||
@ -8966,9 +8966,9 @@ namespace Capnproto_test.Capnp.Test
|
||||
set => Link(1, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.WRITER Inner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.WRITER Inner2
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.WRITER>(2);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.WRITER>(2);
|
||||
set => Link(2, value);
|
||||
}
|
||||
|
||||
@ -9513,8 +9513,8 @@ namespace Capnproto_test.Capnp.Test
|
||||
Basic = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>>(reader.Basic);
|
||||
Inner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner>(reader.Inner);
|
||||
Inner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>>(reader.Inner2);
|
||||
Unspecified = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>>(reader.Unspecified);
|
||||
UnspecifiedInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>>(reader.UnspecifiedInner);
|
||||
Unspecified = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<object, object>>(reader.Unspecified);
|
||||
UnspecifiedInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>>(reader.UnspecifiedInner);
|
||||
Default = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>>(reader.Default);
|
||||
DefaultInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.Inner>(reader.DefaultInner);
|
||||
DefaultUser = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestUseGenerics>(reader.DefaultUser);
|
||||
@ -9523,7 +9523,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
DefaultWrapper2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenericsWrapper2>(reader.DefaultWrapper2);
|
||||
AliasFoo = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestAllTypes>(reader.AliasFoo);
|
||||
AliasInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner>(reader.AliasInner);
|
||||
AliasInner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>>(reader.AliasInner2);
|
||||
AliasInner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>>(reader.AliasInner2);
|
||||
AliasInner2Bind = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>>(reader.AliasInner2Bind);
|
||||
AliasInner2Text = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>>(reader.AliasInner2Text);
|
||||
AliasRev = reader.AliasRev;
|
||||
@ -9739,9 +9739,9 @@ namespace Capnproto_test.Capnp.Test
|
||||
{ },
|
||||
Inner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>()
|
||||
{ },
|
||||
Unspecified = new Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>()
|
||||
Unspecified = new Capnproto_test.Capnp.Test.TestGenerics<object, object>()
|
||||
{ },
|
||||
UnspecifiedInner = new Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>()
|
||||
UnspecifiedInner = new Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>()
|
||||
{ },
|
||||
Default = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>()
|
||||
{ },
|
||||
@ -9759,7 +9759,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{ },
|
||||
AliasInner = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner()
|
||||
{ },
|
||||
AliasInner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>()
|
||||
AliasInner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>()
|
||||
{ },
|
||||
AliasInner2Bind = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>()
|
||||
{ },
|
||||
@ -9951,7 +9951,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
Bar = new Capnproto_test.Capnp.Test.TestAnyPointer()
|
||||
{ }
|
||||
};
|
||||
AliasInner2 = AliasInner2 ?? new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>()
|
||||
AliasInner2 = AliasInner2 ?? new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>()
|
||||
{
|
||||
Bar = new Capnproto_test.Capnp.Test.TestAnyPointer()
|
||||
{ },
|
||||
@ -10176,7 +10176,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
},
|
||||
Bar = new uint[] { }
|
||||
},
|
||||
Inner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.Inner2<AnyPointer>()
|
||||
Inner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.Inner2<object>()
|
||||
{
|
||||
Bar = new uint[] { },
|
||||
InnerBound = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.Inner()
|
||||
@ -10338,13 +10338,13 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer> Unspecified
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object> Unspecified
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string> UnspecifiedInner
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string> UnspecifiedInner
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -10398,7 +10398,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer> AliasInner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object> AliasInner2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -10454,8 +10454,8 @@ namespace Capnproto_test.Capnp.Test
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.READER Basic => ctx.ReadStruct(0, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER Inner => ctx.ReadStruct(1, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER Inner2 => ctx.ReadStruct(2, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.READER Unspecified => ctx.ReadStruct(3, Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.READER UnspecifiedInner => ctx.ReadStruct(4, Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.READER Unspecified => ctx.ReadStruct(3, Capnproto_test.Capnp.Test.TestGenerics<object, object>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.READER UnspecifiedInner => ctx.ReadStruct(4, Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.READER Default => ctx.ReadStruct(5, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.Inner.READER DefaultInner => ctx.ReadStruct(6, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestUseGenerics.READER DefaultUser => ctx.ReadStruct(7, Capnproto_test.Capnp.Test.TestUseGenerics.READER.create);
|
||||
@ -10464,7 +10464,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
public Capnproto_test.Capnp.Test.TestGenericsWrapper2.READER DefaultWrapper2 => ctx.ReadStruct(10, Capnproto_test.Capnp.Test.TestGenericsWrapper2.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestAllTypes.READER AliasFoo => ctx.ReadStruct(11, Capnproto_test.Capnp.Test.TestAllTypes.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER AliasInner => ctx.ReadStruct(12, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.READER AliasInner2 => ctx.ReadStruct(13, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.READER AliasInner2 => ctx.ReadStruct(13, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>.READER AliasInner2Bind => ctx.ReadStruct(14, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER AliasInner2Text => ctx.ReadStruct(15, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER.create);
|
||||
public string AliasRev => ctx.ReadText(16, "text");
|
||||
@ -10498,15 +10498,15 @@ namespace Capnproto_test.Capnp.Test
|
||||
set => Link(2, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.WRITER Unspecified
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.WRITER Unspecified
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.WRITER>(3);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<object, object>.WRITER>(3);
|
||||
set => Link(3, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.WRITER UnspecifiedInner
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.WRITER UnspecifiedInner
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.WRITER>(4);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.WRITER>(4);
|
||||
set => Link(4, value);
|
||||
}
|
||||
|
||||
@ -10558,9 +10558,9 @@ namespace Capnproto_test.Capnp.Test
|
||||
set => Link(12, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.WRITER AliasInner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.WRITER AliasInner2
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.WRITER>(13);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.WRITER>(13);
|
||||
set => Link(13, value);
|
||||
}
|
||||
|
||||
@ -10699,9 +10699,9 @@ namespace Capnproto_test.Capnp.Test
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AnyKindAsStruct = CapnpSerializable.Create<AnyPointer>(reader.AnyKindAsStruct);
|
||||
AnyStructAsStruct = CapnpSerializable.Create<AnyPointer>(reader.AnyStructAsStruct);
|
||||
AnyKindAsList = CapnpSerializable.Create<AnyPointer>(reader.AnyKindAsList);
|
||||
AnyKindAsStruct = CapnpSerializable.Create<object>(reader.AnyKindAsStruct);
|
||||
AnyStructAsStruct = CapnpSerializable.Create<object>(reader.AnyStructAsStruct);
|
||||
AnyKindAsList = CapnpSerializable.Create<object>(reader.AnyKindAsList);
|
||||
AnyListAsList = reader.AnyListAsList.ToReadOnlyList(_ => (object)_);
|
||||
applyDefaults();
|
||||
}
|
||||
@ -10723,19 +10723,19 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
}
|
||||
|
||||
public AnyPointer AnyKindAsStruct
|
||||
public object AnyKindAsStruct
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer AnyStructAsStruct
|
||||
public object AnyStructAsStruct
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer AnyKindAsList
|
||||
public object AnyKindAsList
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -11591,7 +11591,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
public interface ITestPipeline : IDisposable
|
||||
{
|
||||
Task<(string, Capnproto_test.Capnp.Test.TestPipeline.Box)> GetCap(uint n, Capnproto_test.Capnp.Test.ITestInterface inCap, CancellationToken cancellationToken_ = default);
|
||||
Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, AnyPointer obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default);
|
||||
Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, object obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default);
|
||||
Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint n, BareProxy inCap, CancellationToken cancellationToken_ = default);
|
||||
}
|
||||
|
||||
@ -11612,7 +11612,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
);
|
||||
}
|
||||
|
||||
public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, AnyPointer obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default)
|
||||
public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, object obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<Capnproto_test.Capnp.Test.TestPipeline.Params_testPointers.WRITER>();
|
||||
var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_testPointers()
|
||||
@ -11964,7 +11964,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
Cap = reader.Cap;
|
||||
Obj = CapnpSerializable.Create<AnyPointer>(reader.Obj);
|
||||
Obj = CapnpSerializable.Create<object>(reader.Obj);
|
||||
List = reader.List;
|
||||
applyDefaults();
|
||||
}
|
||||
@ -11991,7 +11991,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer Obj
|
||||
public object Obj
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -16294,7 +16294,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
HostId = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestSturdyRefHostId>(reader.HostId);
|
||||
ObjectId = CapnpSerializable.Create<AnyPointer>(reader.ObjectId);
|
||||
ObjectId = CapnpSerializable.Create<object>(reader.ObjectId);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
@ -16319,7 +16319,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer ObjectId
|
||||
public object ObjectId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -355,7 +355,9 @@ namespace Capnp
|
||||
continue;
|
||||
|
||||
case PointerKind.Other:
|
||||
var tmp = Caps;
|
||||
this = default;
|
||||
Caps = tmp;
|
||||
Kind = ObjectKind.Capability;
|
||||
BytesTraversedOrData = pointer.CapabilityIndex;
|
||||
return;
|
||||
|
@ -99,6 +99,7 @@ namespace Capnp.Rpc
|
||||
static CapabilityReflection()
|
||||
{
|
||||
_proxyMap.Add(typeof(BareProxy), new ProxyFactory<BareProxy>());
|
||||
_proxyMap.Add(typeof(object), new ProxyFactory<BareProxy>());
|
||||
}
|
||||
|
||||
static SkeletonFactory CreateMonoSkeletonFactory(SkeletonAttribute attr, Type[] genericArguments)
|
||||
@ -185,7 +186,7 @@ namespace Capnp.Rpc
|
||||
Type proxyClass = attrs[0].ProxyClass;
|
||||
Type[] genericArguments = type.GetGenericArguments();
|
||||
if (genericArguments.Length > 0)
|
||||
proxyClass = proxyClass.MakeGenericType(proxyClass);
|
||||
proxyClass = proxyClass.MakeGenericType(genericArguments);
|
||||
|
||||
return (ProxyFactory)Activator.CreateInstance(
|
||||
typeof(ProxyFactory<>)
|
||||
|
@ -1124,7 +1124,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AnyPointerField = CapnpSerializable.Create<AnyPointer>(reader.AnyPointerField);
|
||||
AnyPointerField = CapnpSerializable.Create<object>(reader.AnyPointerField);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
@ -1142,7 +1142,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
}
|
||||
|
||||
public AnyPointer AnyPointerField
|
||||
public object AnyPointerField
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -1184,7 +1184,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AnyStructField = CapnpSerializable.Create<AnyPointer>(reader.AnyStructField);
|
||||
AnyStructField = CapnpSerializable.Create<object>(reader.AnyStructField);
|
||||
AnyListField = reader.AnyListField.ToReadOnlyList(_ => (object)_);
|
||||
CapabilityField = reader.CapabilityField;
|
||||
applyDefaults();
|
||||
@ -1206,7 +1206,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
}
|
||||
|
||||
public AnyPointer AnyStructField
|
||||
public object AnyStructField
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -8730,7 +8730,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
var reader = READER.create(arg_);
|
||||
Foo = CapnpSerializable.Create<TFoo>(reader.Foo);
|
||||
Inner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner>(reader.Inner);
|
||||
Inner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>>(reader.Inner2);
|
||||
Inner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>>(reader.Inner2);
|
||||
Inner2Bind = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>>(reader.Inner2Bind);
|
||||
Inner2Text = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>>(reader.Inner2Text);
|
||||
RevFoo = CapnpSerializable.Create<TBar>(reader.RevFoo);
|
||||
@ -8768,7 +8768,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer> Inner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object> Inner2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -8805,7 +8805,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
public static implicit operator READER(DeserializerState ctx) => new READER(ctx);
|
||||
public DeserializerState Foo => ctx.StructReadPointer(0);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner.READER Inner => ctx.ReadStruct(1, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.READER Inner2 => ctx.ReadStruct(2, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.READER Inner2 => ctx.ReadStruct(2, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER Inner2Bind => ctx.ReadStruct(3, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER Inner2Text => ctx.ReadStruct(4, Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<string>.READER.create);
|
||||
public DeserializerState RevFoo => ctx.StructReadPointer(5);
|
||||
@ -8830,9 +8830,9 @@ namespace Capnproto_test.Capnp.Test
|
||||
set => Link(1, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.WRITER Inner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.WRITER Inner2
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<AnyPointer>.WRITER>(2);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<TFoo, TBar>.Inner2<object>.WRITER>(2);
|
||||
set => Link(2, value);
|
||||
}
|
||||
|
||||
@ -9377,8 +9377,8 @@ namespace Capnproto_test.Capnp.Test
|
||||
Basic = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>>(reader.Basic);
|
||||
Inner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner>(reader.Inner);
|
||||
Inner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>>(reader.Inner2);
|
||||
Unspecified = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>>(reader.Unspecified);
|
||||
UnspecifiedInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>>(reader.UnspecifiedInner);
|
||||
Unspecified = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<object, object>>(reader.Unspecified);
|
||||
UnspecifiedInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>>(reader.UnspecifiedInner);
|
||||
Default = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>>(reader.Default);
|
||||
DefaultInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.Inner>(reader.DefaultInner);
|
||||
DefaultUser = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestUseGenerics>(reader.DefaultUser);
|
||||
@ -9387,7 +9387,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
DefaultWrapper2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenericsWrapper2>(reader.DefaultWrapper2);
|
||||
AliasFoo = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestAllTypes>(reader.AliasFoo);
|
||||
AliasInner = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner>(reader.AliasInner);
|
||||
AliasInner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>>(reader.AliasInner2);
|
||||
AliasInner2 = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>>(reader.AliasInner2);
|
||||
AliasInner2Bind = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>>(reader.AliasInner2Bind);
|
||||
AliasInner2Text = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>>(reader.AliasInner2Text);
|
||||
AliasRev = reader.AliasRev;
|
||||
@ -9448,8 +9448,8 @@ namespace Capnproto_test.Capnp.Test
|
||||
{}, EnumField = Capnproto_test.Capnp.Test.TestEnum.foo, VoidList = 0, BoolList = new bool[]{}, Int8List = new sbyte[]{}, Int16List = new short[]{}, Int32List = new int[]{}, Int64List = new long[]{}, UInt8List = new byte[]{}, UInt16List = new ushort[]{}, UInt32List = new uint[]{}, UInt64List = new ulong[]{}, Float32List = new float[]{}, Float64List = new double[]{}, TextList = new string[]{}, DataList = new IReadOnlyList<byte>[]{}, StructList = new Capnproto_test.Capnp.Test.TestAllTypes[]{}, EnumList = new Capnproto_test.Capnp.Test.TestEnum[]{}, InterfaceList = 0}, Rev = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAnyPointer, Capnproto_test.Capnp.Test.TestAllTypes>()
|
||||
{}, List = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner[]{}}, Inner = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner()
|
||||
{}, Inner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>()
|
||||
{}, Unspecified = new Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>()
|
||||
{}, UnspecifiedInner = new Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>()
|
||||
{}, Unspecified = new Capnproto_test.Capnp.Test.TestGenerics<object, object>()
|
||||
{}, UnspecifiedInner = new Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>()
|
||||
{}, Default = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>()
|
||||
{}, DefaultInner = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.Inner()
|
||||
{}, DefaultUser = new Capnproto_test.Capnp.Test.TestUseGenerics()
|
||||
@ -9458,7 +9458,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{}, DefaultWrapper2 = new Capnproto_test.Capnp.Test.TestGenericsWrapper2()
|
||||
{}, AliasFoo = new Capnproto_test.Capnp.Test.TestAllTypes()
|
||||
{}, AliasInner = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner()
|
||||
{}, AliasInner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>()
|
||||
{}, AliasInner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>()
|
||||
{}, AliasInner2Bind = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>()
|
||||
{}, AliasInner2Text = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>()
|
||||
{}, AliasRev = null, UseAliases = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.UseAliases()
|
||||
@ -9487,7 +9487,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{BoolField = false, Int8Field = 0, Int16Field = 123, Int32Field = 0, Int64Field = 0L, UInt8Field = 0, UInt16Field = 0, UInt32Field = 0U, UInt64Field = 0UL, Float32Field = 0F, Float64Field = 0, TextField = null, DataField = new byte[]{}, StructField = new Capnproto_test.Capnp.Test.TestAllTypes()
|
||||
{}, EnumField = Capnproto_test.Capnp.Test.TestEnum.foo, VoidList = 0, BoolList = new bool[]{}, Int8List = new sbyte[]{}, Int16List = new short[]{}, Int32List = new int[]{}, Int64List = new long[]{}, UInt8List = new byte[]{}, UInt16List = new ushort[]{}, UInt32List = new uint[]{}, UInt64List = new ulong[]{}, Float32List = new float[]{}, Float64List = new double[]{}, TextList = new string[]{}, DataList = new IReadOnlyList<byte>[]{}, StructList = new Capnproto_test.Capnp.Test.TestAllTypes[]{}, EnumList = new Capnproto_test.Capnp.Test.TestEnum[]{}, InterfaceList = 0}, Bar = new Capnproto_test.Capnp.Test.TestAnyPointer()
|
||||
{}};
|
||||
AliasInner2 = AliasInner2 ?? new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>()
|
||||
AliasInner2 = AliasInner2 ?? new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>()
|
||||
{Bar = new Capnproto_test.Capnp.Test.TestAnyPointer()
|
||||
{}, InnerBound = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner()
|
||||
{Foo = new Capnproto_test.Capnp.Test.TestAllTypes()
|
||||
@ -9518,7 +9518,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{}, EnumField = Capnproto_test.Capnp.Test.TestEnum.foo, VoidList = 0, BoolList = new bool[]{}, Int8List = new sbyte[]{}, Int16List = new short[]{}, Int32List = new int[]{}, Int64List = new long[]{}, UInt8List = new byte[]{}, UInt16List = new ushort[]{}, UInt32List = new uint[]{}, UInt64List = new ulong[]{}, Float32List = new float[]{}, Float64List = new double[]{}, TextList = new string[]{}, DataList = new IReadOnlyList<byte>[]{}, StructList = new Capnproto_test.Capnp.Test.TestAllTypes[]{}, EnumList = new Capnproto_test.Capnp.Test.TestEnum[]{}, InterfaceList = 0}, Inner = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.Inner()
|
||||
{Foo = new Capnproto_test.Capnp.Test.TestAllTypes()
|
||||
{BoolField = false, Int8Field = 0, Int16Field = 123, Int32Field = 0, Int64Field = 0L, UInt8Field = 0, UInt16Field = 0, UInt32Field = 0U, UInt64Field = 0UL, Float32Field = 0F, Float64Field = 0, TextField = null, DataField = new byte[]{}, StructField = new Capnproto_test.Capnp.Test.TestAllTypes()
|
||||
{}, EnumField = Capnproto_test.Capnp.Test.TestEnum.foo, VoidList = 0, BoolList = new bool[]{}, Int8List = new sbyte[]{}, Int16List = new short[]{}, Int32List = new int[]{}, Int64List = new long[]{}, UInt8List = new byte[]{}, UInt16List = new ushort[]{}, UInt32List = new uint[]{}, UInt64List = new ulong[]{}, Float32List = new float[]{}, Float64List = new double[]{}, TextList = new string[]{}, DataList = new IReadOnlyList<byte>[]{}, StructList = new Capnproto_test.Capnp.Test.TestAllTypes[]{}, EnumList = new Capnproto_test.Capnp.Test.TestEnum[]{}, InterfaceList = 0}, Bar = new uint[]{}}, Inner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.Inner2<AnyPointer>()
|
||||
{}, EnumField = Capnproto_test.Capnp.Test.TestEnum.foo, VoidList = 0, BoolList = new bool[]{}, Int8List = new sbyte[]{}, Int16List = new short[]{}, Int32List = new int[]{}, Int64List = new long[]{}, UInt8List = new byte[]{}, UInt16List = new ushort[]{}, UInt32List = new uint[]{}, UInt64List = new ulong[]{}, Float32List = new float[]{}, Float64List = new double[]{}, TextList = new string[]{}, DataList = new IReadOnlyList<byte>[]{}, StructList = new Capnproto_test.Capnp.Test.TestAllTypes[]{}, EnumList = new Capnproto_test.Capnp.Test.TestEnum[]{}, InterfaceList = 0}, Bar = new uint[]{}}, Inner2 = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.Inner2<object>()
|
||||
{Bar = new uint[]{}, InnerBound = new Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, IReadOnlyList<uint>>.Inner()
|
||||
{Foo = new Capnproto_test.Capnp.Test.TestAllTypes()
|
||||
{BoolField = false, Int8Field = 0, Int16Field = 123, Int32Field = 0, Int64Field = 0L, UInt8Field = 0, UInt16Field = 0, UInt32Field = 0U, UInt64Field = 0UL, Float32Field = 0F, Float64Field = 0, TextField = null, DataField = new byte[]{}, StructField = new Capnproto_test.Capnp.Test.TestAllTypes()
|
||||
@ -9554,13 +9554,13 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer> Unspecified
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object> Unspecified
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string> UnspecifiedInner
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string> UnspecifiedInner
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -9614,7 +9614,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer> AliasInner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object> AliasInner2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -9670,8 +9670,8 @@ namespace Capnproto_test.Capnp.Test
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.READER Basic => ctx.ReadStruct(0, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER Inner => ctx.ReadStruct(1, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER Inner2 => ctx.ReadStruct(2, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.READER Unspecified => ctx.ReadStruct(3, Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.READER UnspecifiedInner => ctx.ReadStruct(4, Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.READER Unspecified => ctx.ReadStruct(3, Capnproto_test.Capnp.Test.TestGenerics<object, object>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.READER UnspecifiedInner => ctx.ReadStruct(4, Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.READER Default => ctx.ReadStruct(5, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.Inner.READER DefaultInner => ctx.ReadStruct(6, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, string>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestUseGenerics.READER DefaultUser => ctx.ReadStruct(7, Capnproto_test.Capnp.Test.TestUseGenerics.READER.create);
|
||||
@ -9680,7 +9680,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
public Capnproto_test.Capnp.Test.TestGenericsWrapper2.READER DefaultWrapper2 => ctx.ReadStruct(10, Capnproto_test.Capnp.Test.TestGenericsWrapper2.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestAllTypes.READER AliasFoo => ctx.ReadStruct(11, Capnproto_test.Capnp.Test.TestAllTypes.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER AliasInner => ctx.ReadStruct(12, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.READER AliasInner2 => ctx.ReadStruct(13, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.READER AliasInner2 => ctx.ReadStruct(13, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>.READER AliasInner2Bind => ctx.ReadStruct(14, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<IReadOnlyList<uint>>.READER.create);
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER AliasInner2Text => ctx.ReadStruct(15, Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<string>.READER.create);
|
||||
public string AliasRev => ctx.ReadText(16, "text");
|
||||
@ -9714,15 +9714,15 @@ namespace Capnproto_test.Capnp.Test
|
||||
set => Link(2, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.WRITER Unspecified
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.WRITER Unspecified
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.WRITER>(3);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<object, object>.WRITER>(3);
|
||||
set => Link(3, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.WRITER UnspecifiedInner
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.WRITER UnspecifiedInner
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<AnyPointer, AnyPointer>.Inner2<string>.WRITER>(4);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<object, object>.Inner2<string>.WRITER>(4);
|
||||
set => Link(4, value);
|
||||
}
|
||||
|
||||
@ -9774,9 +9774,9 @@ namespace Capnproto_test.Capnp.Test
|
||||
set => Link(12, value);
|
||||
}
|
||||
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.WRITER AliasInner2
|
||||
public Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.WRITER AliasInner2
|
||||
{
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<AnyPointer>.WRITER>(13);
|
||||
get => BuildPointer<Capnproto_test.Capnp.Test.TestGenerics<Capnproto_test.Capnp.Test.TestAllTypes, Capnproto_test.Capnp.Test.TestAnyPointer>.Inner2<object>.WRITER>(13);
|
||||
set => Link(13, value);
|
||||
}
|
||||
|
||||
@ -9915,9 +9915,9 @@ namespace Capnproto_test.Capnp.Test
|
||||
void ICapnpSerializable.Deserialize(DeserializerState arg_)
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
AnyKindAsStruct = CapnpSerializable.Create<AnyPointer>(reader.AnyKindAsStruct);
|
||||
AnyStructAsStruct = CapnpSerializable.Create<AnyPointer>(reader.AnyStructAsStruct);
|
||||
AnyKindAsList = CapnpSerializable.Create<AnyPointer>(reader.AnyKindAsList);
|
||||
AnyKindAsStruct = CapnpSerializable.Create<object>(reader.AnyKindAsStruct);
|
||||
AnyStructAsStruct = CapnpSerializable.Create<object>(reader.AnyStructAsStruct);
|
||||
AnyKindAsList = CapnpSerializable.Create<object>(reader.AnyKindAsList);
|
||||
AnyListAsList = reader.AnyListAsList.ToReadOnlyList(_ => (object)_);
|
||||
applyDefaults();
|
||||
}
|
||||
@ -9939,19 +9939,19 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
}
|
||||
|
||||
public AnyPointer AnyKindAsStruct
|
||||
public object AnyKindAsStruct
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer AnyStructAsStruct
|
||||
public object AnyStructAsStruct
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer AnyKindAsList
|
||||
public object AnyKindAsList
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -10807,7 +10807,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
public interface ITestPipeline : IDisposable
|
||||
{
|
||||
Task<(string, Capnproto_test.Capnp.Test.TestPipeline.Box)> GetCap(uint n, Capnproto_test.Capnp.Test.ITestInterface inCap, CancellationToken cancellationToken_ = default);
|
||||
Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, AnyPointer obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default);
|
||||
Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, object obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default);
|
||||
Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint n, BareProxy inCap, CancellationToken cancellationToken_ = default);
|
||||
}
|
||||
|
||||
@ -10828,7 +10828,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
);
|
||||
}
|
||||
|
||||
public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, AnyPointer obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default)
|
||||
public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, object obj, IReadOnlyList<Capnproto_test.Capnp.Test.ITestInterface> list, CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
var in_ = SerializerState.CreateForRpc<Capnproto_test.Capnp.Test.TestPipeline.Params_testPointers.WRITER>();
|
||||
var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_testPointers()
|
||||
@ -11180,7 +11180,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
Cap = reader.Cap;
|
||||
Obj = CapnpSerializable.Create<AnyPointer>(reader.Obj);
|
||||
Obj = CapnpSerializable.Create<object>(reader.Obj);
|
||||
List = reader.List;
|
||||
applyDefaults();
|
||||
}
|
||||
@ -11207,7 +11207,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer Obj
|
||||
public object Obj
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@ -15510,7 +15510,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
{
|
||||
var reader = READER.create(arg_);
|
||||
HostId = CapnpSerializable.Create<Capnproto_test.Capnp.Test.TestSturdyRefHostId>(reader.HostId);
|
||||
ObjectId = CapnpSerializable.Create<AnyPointer>(reader.ObjectId);
|
||||
ObjectId = CapnpSerializable.Create<object>(reader.ObjectId);
|
||||
applyDefaults();
|
||||
}
|
||||
|
||||
@ -15535,7 +15535,7 @@ namespace Capnproto_test.Capnp.Test
|
||||
set;
|
||||
}
|
||||
|
||||
public AnyPointer ObjectId
|
||||
public object ObjectId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -406,7 +406,7 @@ namespace CapnpC.CSharp.Generator.CodeGen
|
||||
}
|
||||
else
|
||||
{
|
||||
return SyntaxHelpers.Type<Capnp.AnyPointer>();
|
||||
return SyntaxHelpers.Type<object>();
|
||||
}
|
||||
|
||||
default:
|
||||
|
19
MsBuildGenerationTest/Issue25.capnp
Normal file
19
MsBuildGenerationTest/Issue25.capnp
Normal file
@ -0,0 +1,19 @@
|
||||
@0xa53fcfef8b306bfb;
|
||||
|
||||
interface Issue25A {
|
||||
methodA @0 () -> (result :Int64);
|
||||
}
|
||||
|
||||
interface CapHolder(CapType) {
|
||||
cap @0 () -> (cap :CapType);
|
||||
}
|
||||
|
||||
interface CapHolderA {
|
||||
cap @0 () -> (cap :Issue25A);
|
||||
}
|
||||
|
||||
interface Issue25B {
|
||||
getAinCapHolderAnyPointer @0 () -> (aInCapHolder :CapHolder);
|
||||
getAinCapHolderGenericA @1 () -> (aInCapHolder :CapHolder(Issue25A));
|
||||
getAinCapHolderNonGenericA @2 () -> (aInCapHolder :CapHolderA);
|
||||
}
|
@ -16,6 +16,10 @@
|
||||
<None Remove="capnp\bergm.capnp.bin" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CapnpFiles Include="Issue25.capnp" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Capnp.Net.Runtime" Version="$(PackageReferenceVersion)" />
|
||||
<PackageReference Include="CapnpC.CSharp.MsBuild.Generation" Version="$(PackageReferenceVersion)" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user