diff --git a/Capnp.Net.Runtime.Tests/Interception.cs b/Capnp.Net.Runtime.Tests/Interception.cs index 49aa040..76421da 100644 --- a/Capnp.Net.Runtime.Tests/Interception.cs +++ b/Capnp.Net.Runtime.Tests/Interception.cs @@ -169,7 +169,7 @@ namespace Capnp.Net.Runtime.Tests var rx = policy.Returns.ReceiveAsync(); // Racing against Bob's answer - Assert.IsTrue(cc.State == InterceptionState.ForwardedToBob || rx.IsCompleted); + Assert.IsTrue(cc.State == InterceptionState.ForwardedToBob || cc.State == InterceptionState.ReturnedFromBob); Assert.IsTrue(rx.Wait(MediumNonDbgTimeout)); var rr = new Capnproto_test.Capnp.Test.TestInterface.Result_Foo.READER(cc.OutArgs); diff --git a/Capnp.Net.Runtime.Tests/Mock/test.cs b/Capnp.Net.Runtime.Tests/Mock/test.cs index 51b4975..1e6dacb 100644 --- a/Capnp.Net.Runtime.Tests/Mock/test.cs +++ b/Capnp.Net.Runtime.Tests/Mock/test.cs @@ -8609,6 +8609,7 @@ namespace Capnproto_test.Capnp.Test Task Call(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8839ed86c9794287UL)] public class DeepNestInterface_Proxy : Proxy, IDeepNestInterface where TQuux : class { public async Task Call(CancellationToken cancellationToken_ = default) @@ -8625,6 +8626,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8839ed86c9794287UL)] public class DeepNestInterface_Skeleton : Skeleton> where TQuux : class { public DeepNestInterface_Skeleton() @@ -8746,6 +8748,7 @@ namespace Capnproto_test.Capnp.Test Task<(TQux, Capnproto_test.Capnp.Test.TestGenerics)> Call(Capnproto_test.Capnp.Test.TestGenerics.Inner2 arg_, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc9e749e8dd54da5cUL)] public class Interface_Proxy : Proxy, IInterface where TQux : class { public Task<(TQux, Capnproto_test.Capnp.Test.TestGenerics)> Call(Capnproto_test.Capnp.Test.TestGenerics.Inner2 arg_, CancellationToken cancellationToken_ = default) @@ -8765,6 +8768,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc9e749e8dd54da5cUL)] public class Interface_Skeleton : Skeleton> where TQux : class { public Interface_Skeleton() @@ -9128,18 +9132,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8b9717a3f8d85a9aUL), Proxy(typeof(TestImplicitMethodParams_Proxy)), Skeleton(typeof(TestImplicitMethodParams_Skeleton))] public interface ITestImplicitMethodParams : IDisposable { - Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class; } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8b9717a3f8d85a9aUL)] public class TestImplicitMethodParams_Proxy : Proxy, ITestImplicitMethodParams { - public Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + public Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class { var in_ = SerializerState.CreateForRpc.WRITER>(); var arg_ = new Capnproto_test.Capnp.Test.TestImplicitMethodParams.Params_Call() - { Foo = Foo, Bar = Bar }; + { Foo = foo, Bar = bar }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(10058534285777328794UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -9154,6 +9159,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8b9717a3f8d85a9aUL)] public class TestImplicitMethodParams_Skeleton : Skeleton { public TestImplicitMethodParams_Skeleton() @@ -9261,18 +9267,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xdf9ccdeb81a704c9UL), Proxy(typeof(TestImplicitMethodParamsInGeneric_Proxy<>)), Skeleton(typeof(TestImplicitMethodParamsInGeneric_Skeleton<>))] public interface ITestImplicitMethodParamsInGeneric : IDisposable where TV : class { - Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class; } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xdf9ccdeb81a704c9UL)] public class TestImplicitMethodParamsInGeneric_Proxy : Proxy, ITestImplicitMethodParamsInGeneric where TV : class { - public Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + public Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class { var in_ = SerializerState.CreateForRpc.Params_Call.WRITER>(); var arg_ = new Capnproto_test.Capnp.Test.TestImplicitMethodParamsInGeneric.Params_Call() - { Foo = Foo, Bar = Bar }; + { Foo = foo, Bar = bar }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(16112979978201007305UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -9287,6 +9294,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xdf9ccdeb81a704c9UL)] public class TestImplicitMethodParamsInGeneric_Skeleton : Skeleton> where TV : class { public TestImplicitMethodParamsInGeneric_Skeleton() @@ -10824,18 +10832,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x88eb12a0e0af92b2UL), Proxy(typeof(TestInterface_Proxy)), Skeleton(typeof(TestInterface_Skeleton))] public interface ITestInterface : IDisposable { - Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default); + Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default); Task Bar(CancellationToken cancellationToken_ = default); - Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default); + Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x88eb12a0e0af92b2UL)] public class TestInterface_Proxy : Proxy, ITestInterface { - public async Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default) + public async Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Foo() - { I = I, J = J }; + { I = i, J = j }; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10857,11 +10866,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default) + public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Baz() - { S = S }; + { S = s }; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10871,6 +10880,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x88eb12a0e0af92b2UL)] public class TestInterface_Skeleton : Skeleton { public TestInterface_Skeleton() @@ -11259,6 +11269,7 @@ namespace Capnproto_test.Capnp.Test Task Grault(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xe4e9bac98670b748UL)] public class TestExtends_Proxy : Proxy, ITestExtends { public async Task Qux(CancellationToken cancellationToken_ = default) @@ -11298,11 +11309,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default) + public async Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Foo() - { I = I, J = J }; + { I = i, J = j }; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -11324,11 +11335,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default) + public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Baz() - { S = S }; + { S = s }; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -11338,6 +11349,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xe4e9bac98670b748UL)] public class TestExtends_Skeleton : Skeleton { public TestExtends_Skeleton() @@ -11570,6 +11582,7 @@ namespace Capnproto_test.Capnp.Test { } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x98d7e0ef61488783UL)] public class TestExtends2_Proxy : Proxy, ITestExtends2 { public async Task Qux(CancellationToken cancellationToken_ = default) @@ -11609,11 +11622,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default) + public async Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Foo() - { I = I, J = J }; + { I = i, J = j }; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -11635,11 +11648,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default) + public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Baz() - { S = S }; + { S = s }; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -11649,6 +11662,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x98d7e0ef61488783UL)] public class TestExtends2_Skeleton : Skeleton { public TestExtends2_Skeleton() @@ -11662,18 +11676,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa5a404caa61d4cd0UL), Proxy(typeof(TestPipeline_Proxy)), Skeleton(typeof(TestPipeline_Skeleton))] 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, object Obj, IReadOnlyList List, CancellationToken cancellationToken_ = default); - Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint N, BareProxy InCap, CancellationToken cancellationToken_ = default); + 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, object obj, IReadOnlyList list, CancellationToken cancellationToken_ = default); + Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint n, BareProxy inCap, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa5a404caa61d4cd0UL)] public class TestPipeline_Proxy : Proxy, ITestPipeline { - public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.Box)> GetCap(uint N, Capnproto_test.Capnp.Test.ITestInterface InCap, CancellationToken cancellationToken_ = default) + public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.Box)> GetCap(uint n, Capnproto_test.Capnp.Test.ITestInterface inCap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_GetCap() - { N = N, InCap = InCap }; + { N = n, InCap = inCap }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(11935670180855499984UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -11687,11 +11702,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface Cap, object Obj, IReadOnlyList List, CancellationToken cancellationToken_ = default) + public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, object obj, IReadOnlyList list, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_TestPointers() - { Cap = Cap, Obj = Obj, List = List }; + { Cap = cap, Obj = obj, List = list }; arg_?.serialize(in_); using (var d_ = await Call(11935670180855499984UL, 1, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -11700,11 +11715,11 @@ namespace Capnproto_test.Capnp.Test } } - public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint N, BareProxy InCap, CancellationToken cancellationToken_ = default) + public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint n, BareProxy inCap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_GetAnyCap() - { N = N, InCap = InCap }; + { N = n, InCap = inCap }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(11935670180855499984UL, 2, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -11719,6 +11734,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa5a404caa61d4cd0UL)] public class TestPipeline_Skeleton : Skeleton { public TestPipeline_Skeleton() @@ -12334,16 +12350,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa0e77035bdff0051UL), Proxy(typeof(TestCallOrder_Proxy)), Skeleton(typeof(TestCallOrder_Skeleton))] public interface ITestCallOrder : IDisposable { - Task GetCallSequence(uint Expected, CancellationToken cancellationToken_ = default); + Task GetCallSequence(uint expected, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa0e77035bdff0051UL)] public class TestCallOrder_Proxy : Proxy, ITestCallOrder { - public async Task GetCallSequence(uint Expected, CancellationToken cancellationToken_ = default) + public async Task GetCallSequence(uint expected, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestCallOrder.Params_GetCallSequence() - { Expected = Expected }; + { Expected = expected }; arg_?.serialize(in_); using (var d_ = await Call(11594359141811814481UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12353,6 +12370,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa0e77035bdff0051UL)] public class TestCallOrder_Skeleton : Skeleton { public TestCallOrder_Skeleton() @@ -12505,16 +12523,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddd699207eb8e23bUL), Proxy(typeof(TestTailCallee_Proxy)), Skeleton(typeof(TestTailCallee_Skeleton))] public interface ITestTailCallee : IDisposable { - Task Foo(int I, string T, CancellationToken cancellationToken_ = default); + Task Foo(int i, string t, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddd699207eb8e23bUL)] public class TestTailCallee_Proxy : Proxy, ITestTailCallee { - public Task Foo(int I, string T, CancellationToken cancellationToken_ = default) + public Task Foo(int i, string t, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestTailCallee.Params_Foo() - { I = I, T = T }; + { I = i, T = t }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(15985132292242203195UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -12529,6 +12548,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddd699207eb8e23bUL)] public class TestTailCallee_Skeleton : Skeleton { public TestTailCallee_Skeleton() @@ -12725,16 +12745,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x870bf40110ce3035UL), Proxy(typeof(TestTailCaller_Proxy)), Skeleton(typeof(TestTailCaller_Skeleton))] public interface ITestTailCaller : IDisposable { - Task Foo(int I, Capnproto_test.Capnp.Test.ITestTailCallee Callee, CancellationToken cancellationToken_ = default); + Task Foo(int i, Capnproto_test.Capnp.Test.ITestTailCallee callee, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x870bf40110ce3035UL)] public class TestTailCaller_Proxy : Proxy, ITestTailCaller { - public Task Foo(int I, Capnproto_test.Capnp.Test.ITestTailCallee Callee, CancellationToken cancellationToken_ = default) + public Task Foo(int i, Capnproto_test.Capnp.Test.ITestTailCallee callee, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestTailCaller.Params_Foo() - { I = I, Callee = Callee }; + { I = i, Callee = callee }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(9731139705278181429UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -12749,6 +12770,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x870bf40110ce3035UL)] public class TestTailCaller_Skeleton : Skeleton { public TestTailCaller_Skeleton() @@ -12857,10 +12879,12 @@ namespace Capnproto_test.Capnp.Test { } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa38e5efe41e53a15UL)] public class TestHandle_Proxy : Proxy, ITestHandle { } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa38e5efe41e53a15UL)] public class TestHandle_Skeleton : Skeleton { public TestHandle_Skeleton() @@ -12874,28 +12898,29 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddc70bf9784133cfUL), Proxy(typeof(TestMoreStuff_Proxy)), Skeleton(typeof(TestMoreStuff_Skeleton))] public interface ITestMoreStuff : Capnproto_test.Capnp.Test.ITestCallOrder { - Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task Hold(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); + Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task Hold(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); Task CallHeld(CancellationToken cancellationToken_ = default); Task GetHeld(CancellationToken cancellationToken_ = default); - Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder Cap, CancellationToken cancellationToken_ = default); - Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task<(string, string)> MethodWithDefaults(string A, uint B, string C, CancellationToken cancellationToken_ = default); + Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder cap, CancellationToken cancellationToken_ = default); + Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task<(string, string)> MethodWithDefaults(string a, uint b, string c, CancellationToken cancellationToken_ = default); Task GetHandle(CancellationToken cancellationToken_ = default); Task GetNull(CancellationToken cancellationToken_ = default); Task GetEnormousString(CancellationToken cancellationToken_ = default); - Task MethodWithNullDefault(string A, Capnproto_test.Capnp.Test.ITestInterface B, CancellationToken cancellationToken_ = default); + Task MethodWithNullDefault(string a, Capnproto_test.Capnp.Test.ITestInterface b, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddc70bf9784133cfUL)] public class TestMoreStuff_Proxy : Proxy, ITestMoreStuff { - public async Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_CallFoo() - { Cap = Cap }; + { Cap = cap }; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12904,11 +12929,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_CallFooWhenResolved() - { Cap = Cap }; + { Cap = cap }; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 1, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12917,11 +12942,11 @@ namespace Capnproto_test.Capnp.Test } } - public Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_NeverReturn() - { Cap = Cap }; + { Cap = cap }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(15980754968839795663UL, 2, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -12935,11 +12960,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task Hold(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task Hold(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_Hold() - { Cap = Cap }; + { Cap = cap }; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 3, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12979,11 +13004,11 @@ namespace Capnproto_test.Capnp.Test ); } - public Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder Cap, CancellationToken cancellationToken_ = default) + public Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_Echo() - { Cap = Cap }; + { Cap = cap }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(15980754968839795663UL, 6, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -12997,11 +13022,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_ExpectCancel() - { Cap = Cap }; + { Cap = cap }; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 7, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -13010,11 +13035,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task<(string, string)> MethodWithDefaults(string A, uint B, string C, CancellationToken cancellationToken_ = default) + public async Task<(string, string)> MethodWithDefaults(string a, uint b, string c, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_MethodWithDefaults() - { A = A, B = B, C = C }; + { A = a, B = b, C = c }; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 8, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -13072,11 +13097,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task MethodWithNullDefault(string A, Capnproto_test.Capnp.Test.ITestInterface B, CancellationToken cancellationToken_ = default) + public async Task MethodWithNullDefault(string a, Capnproto_test.Capnp.Test.ITestInterface b, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_MethodWithNullDefault() - { A = A, B = B }; + { A = a, B = b }; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 12, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -13085,11 +13110,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task GetCallSequence(uint Expected, CancellationToken cancellationToken_ = default) + public async Task GetCallSequence(uint expected, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestCallOrder.Params_GetCallSequence() - { Expected = Expected }; + { Expected = expected }; arg_?.serialize(in_); using (var d_ = await Call(11594359141811814481UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -13099,6 +13124,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddc70bf9784133cfUL)] public class TestMoreStuff_Skeleton : Skeleton { public TestMoreStuff_Skeleton() @@ -14816,12 +14842,13 @@ namespace Capnproto_test.Capnp.Test public interface ITestMembrane : IDisposable { Task MakeThing(CancellationToken cancellationToken_ = default); - Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default); - Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default); - Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, CancellationToken cancellationToken_ = default); + Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default); + Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default); + Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, CancellationToken cancellationToken_ = default); Task WaitForever(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc07d8dcd80a69c0cUL)] public class TestMembrane_Proxy : Proxy, ITestMembrane { public Task MakeThing(CancellationToken cancellationToken_ = default) @@ -14842,11 +14869,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default) + public async Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMembrane.Params_CallPassThrough() - { Thing = Thing, TailCall = TailCall }; + { Thing = thing, TailCall = tailCall }; arg_?.serialize(in_); using (var d_ = await Call(13870398341137210380UL, 1, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -14855,11 +14882,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default) + public async Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMembrane.Params_CallIntercept() - { Thing = Thing, TailCall = TailCall }; + { Thing = thing, TailCall = tailCall }; arg_?.serialize(in_); using (var d_ = await Call(13870398341137210380UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -14868,11 +14895,11 @@ namespace Capnproto_test.Capnp.Test } } - public Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, CancellationToken cancellationToken_ = default) + public Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMembrane.Params_Loopback() - { Thing = Thing }; + { Thing = thing }; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(13870398341137210380UL, 3, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -14900,6 +14927,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc07d8dcd80a69c0cUL)] public class TestMembrane_Skeleton : Skeleton { public TestMembrane_Skeleton() @@ -14993,6 +15021,7 @@ namespace Capnproto_test.Capnp.Test Task Intercept(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9352e4e41f173917UL)] public class Thing_Proxy : Proxy, IThing { public async Task PassThrough(CancellationToken cancellationToken_ = default) @@ -15022,6 +15051,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9352e4e41f173917UL)] public class Thing_Skeleton : Skeleton { public Thing_Skeleton() @@ -15899,6 +15929,7 @@ namespace Capnproto_test.Capnp.Test Task Return(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9ae342d394247cfcUL)] public class TestKeywordMethods_Proxy : Proxy, ITestKeywordMethods { public async Task Delete(CancellationToken cancellationToken_ = default) @@ -15954,6 +15985,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9ae342d394247cfcUL)] public class TestKeywordMethods_Skeleton : Skeleton { public TestKeywordMethods_Skeleton() @@ -16372,6 +16404,7 @@ namespace Capnproto_test.Capnp.Test Task GetCallerId(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xea72cc77253798cdUL)] public class TestAuthenticatedBootstrap_Proxy : Proxy, ITestAuthenticatedBootstrap where TVatId : class { public Task GetCallerId(CancellationToken cancellationToken_ = default) @@ -16393,6 +16426,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xea72cc77253798cdUL)] public class TestAuthenticatedBootstrap_Skeleton : Skeleton> where TVatId : class { public TestAuthenticatedBootstrap_Skeleton() @@ -17349,16 +17383,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xd112a69d31ed918bUL), Proxy(typeof(TestNameAnnotationInterface_Proxy)), Skeleton(typeof(TestNameAnnotationInterface_Skeleton))] public interface ITestNameAnnotationInterface : IDisposable { - Task BadlyNamedMethod(byte BadlyNamedParam, CancellationToken cancellationToken_ = default); + Task BadlyNamedMethod(byte badlyNamedParam, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xd112a69d31ed918bUL)] public class TestNameAnnotationInterface_Proxy : Proxy, ITestNameAnnotationInterface { - public async Task BadlyNamedMethod(byte BadlyNamedParam, CancellationToken cancellationToken_ = default) + public async Task BadlyNamedMethod(byte badlyNamedParam, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestNameAnnotationInterface.Params_BadlyNamedMethod() - { BadlyNamedParam = BadlyNamedParam }; + { BadlyNamedParam = badlyNamedParam }; arg_?.serialize(in_); using (var d_ = await Call(15065286897585459595UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -17368,6 +17403,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xd112a69d31ed918bUL)] public class TestNameAnnotationInterface_Skeleton : Skeleton { public TestNameAnnotationInterface_Skeleton() diff --git a/CapnpC.CSharp.Generator.Tests/Embedded Resources/test.cs b/CapnpC.CSharp.Generator.Tests/Embedded Resources/test.cs index 919dabb..ac83045 100644 --- a/CapnpC.CSharp.Generator.Tests/Embedded Resources/test.cs +++ b/CapnpC.CSharp.Generator.Tests/Embedded Resources/test.cs @@ -8473,6 +8473,7 @@ namespace Capnproto_test.Capnp.Test Task Call(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8839ed86c9794287UL)] public class DeepNestInterface_Proxy : Proxy, IDeepNestInterface where TQuux : class { public async Task Call(CancellationToken cancellationToken_ = default) @@ -8489,6 +8490,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8839ed86c9794287UL)] public class DeepNestInterface_Skeleton : Skeleton> where TQuux : class { public DeepNestInterface_Skeleton() @@ -8610,6 +8612,7 @@ namespace Capnproto_test.Capnp.Test Task<(TQux, Capnproto_test.Capnp.Test.TestGenerics)> Call(Capnproto_test.Capnp.Test.TestGenerics.Inner2 arg_, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc9e749e8dd54da5cUL)] public class Interface_Proxy : Proxy, IInterface where TQux : class { public Task<(TQux, Capnproto_test.Capnp.Test.TestGenerics)> Call(Capnproto_test.Capnp.Test.TestGenerics.Inner2 arg_, CancellationToken cancellationToken_ = default) @@ -8629,6 +8632,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc9e749e8dd54da5cUL)] public class Interface_Skeleton : Skeleton> where TQux : class { public Interface_Skeleton() @@ -8992,18 +8996,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8b9717a3f8d85a9aUL), Proxy(typeof(TestImplicitMethodParams_Proxy)), Skeleton(typeof(TestImplicitMethodParams_Skeleton))] public interface ITestImplicitMethodParams : IDisposable { - Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class; } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8b9717a3f8d85a9aUL)] public class TestImplicitMethodParams_Proxy : Proxy, ITestImplicitMethodParams { - public Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + public Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class { var in_ = SerializerState.CreateForRpc.WRITER>(); var arg_ = new Capnproto_test.Capnp.Test.TestImplicitMethodParams.Params_Call() - {Foo = Foo, Bar = Bar}; + {Foo = foo, Bar = bar}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(10058534285777328794UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -9018,6 +9023,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x8b9717a3f8d85a9aUL)] public class TestImplicitMethodParams_Skeleton : Skeleton { public TestImplicitMethodParams_Skeleton() @@ -9125,18 +9131,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xdf9ccdeb81a704c9UL), Proxy(typeof(TestImplicitMethodParamsInGeneric_Proxy<>)), Skeleton(typeof(TestImplicitMethodParamsInGeneric_Skeleton<>))] public interface ITestImplicitMethodParamsInGeneric : IDisposable where TV : class { - Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class; } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xdf9ccdeb81a704c9UL)] public class TestImplicitMethodParamsInGeneric_Proxy : Proxy, ITestImplicitMethodParamsInGeneric where TV : class { - public Task> Call(TT Foo, TU Bar, CancellationToken cancellationToken_ = default) + public Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) where TT : class where TU : class { var in_ = SerializerState.CreateForRpc.Params_Call.WRITER>(); var arg_ = new Capnproto_test.Capnp.Test.TestImplicitMethodParamsInGeneric.Params_Call() - {Foo = Foo, Bar = Bar}; + {Foo = foo, Bar = bar}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(16112979978201007305UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -9151,6 +9158,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xdf9ccdeb81a704c9UL)] public class TestImplicitMethodParamsInGeneric_Skeleton : Skeleton> where TV : class { public TestImplicitMethodParamsInGeneric_Skeleton() @@ -10040,18 +10048,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x88eb12a0e0af92b2UL), Proxy(typeof(TestInterface_Proxy)), Skeleton(typeof(TestInterface_Skeleton))] public interface ITestInterface : IDisposable { - Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default); + Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default); Task Bar(CancellationToken cancellationToken_ = default); - Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default); + Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x88eb12a0e0af92b2UL)] public class TestInterface_Proxy : Proxy, ITestInterface { - public async Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default) + public async Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Foo() - {I = I, J = J}; + {I = i, J = j}; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10073,11 +10082,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default) + public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Baz() - {S = S}; + {S = s}; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10087,6 +10096,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x88eb12a0e0af92b2UL)] public class TestInterface_Skeleton : Skeleton { public TestInterface_Skeleton() @@ -10475,6 +10485,7 @@ namespace Capnproto_test.Capnp.Test Task Grault(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xe4e9bac98670b748UL)] public class TestExtends_Proxy : Proxy, ITestExtends { public async Task Qux(CancellationToken cancellationToken_ = default) @@ -10514,11 +10525,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default) + public async Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Foo() - {I = I, J = J}; + {I = i, J = j}; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10540,11 +10551,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default) + public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Baz() - {S = S}; + {S = s}; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10554,6 +10565,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xe4e9bac98670b748UL)] public class TestExtends_Skeleton : Skeleton { public TestExtends_Skeleton() @@ -10786,6 +10798,7 @@ namespace Capnproto_test.Capnp.Test { } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x98d7e0ef61488783UL)] public class TestExtends2_Proxy : Proxy, ITestExtends2 { public async Task Qux(CancellationToken cancellationToken_ = default) @@ -10825,11 +10838,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Foo(uint I, bool J, CancellationToken cancellationToken_ = default) + public async Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Foo() - {I = I, J = J}; + {I = i, J = j}; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10851,11 +10864,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes S, CancellationToken cancellationToken_ = default) + public async Task Baz(Capnproto_test.Capnp.Test.TestAllTypes s, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestInterface.Params_Baz() - {S = S}; + {S = s}; arg_?.serialize(in_); using (var d_ = await Call(9865999890858873522UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10865,6 +10878,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x98d7e0ef61488783UL)] public class TestExtends2_Skeleton : Skeleton { public TestExtends2_Skeleton() @@ -10878,18 +10892,19 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa5a404caa61d4cd0UL), Proxy(typeof(TestPipeline_Proxy)), Skeleton(typeof(TestPipeline_Skeleton))] 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, object Obj, IReadOnlyList List, CancellationToken cancellationToken_ = default); - Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint N, BareProxy InCap, CancellationToken cancellationToken_ = default); + 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, object obj, IReadOnlyList list, CancellationToken cancellationToken_ = default); + Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint n, BareProxy inCap, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa5a404caa61d4cd0UL)] public class TestPipeline_Proxy : Proxy, ITestPipeline { - public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.Box)> GetCap(uint N, Capnproto_test.Capnp.Test.ITestInterface InCap, CancellationToken cancellationToken_ = default) + public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.Box)> GetCap(uint n, Capnproto_test.Capnp.Test.ITestInterface inCap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_GetCap() - {N = N, InCap = InCap}; + {N = n, InCap = inCap}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(11935670180855499984UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -10903,11 +10918,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface Cap, object Obj, IReadOnlyList List, CancellationToken cancellationToken_ = default) + public async Task TestPointers(Capnproto_test.Capnp.Test.ITestInterface cap, object obj, IReadOnlyList list, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_TestPointers() - {Cap = Cap, Obj = Obj, List = List}; + {Cap = cap, Obj = obj, List = list}; arg_?.serialize(in_); using (var d_ = await Call(11935670180855499984UL, 1, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -10916,11 +10931,11 @@ namespace Capnproto_test.Capnp.Test } } - public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint N, BareProxy InCap, CancellationToken cancellationToken_ = default) + public Task<(string, Capnproto_test.Capnp.Test.TestPipeline.AnyBox)> GetAnyCap(uint n, BareProxy inCap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestPipeline.Params_GetAnyCap() - {N = N, InCap = InCap}; + {N = n, InCap = inCap}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(11935670180855499984UL, 2, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -10935,6 +10950,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa5a404caa61d4cd0UL)] public class TestPipeline_Skeleton : Skeleton { public TestPipeline_Skeleton() @@ -11550,16 +11566,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa0e77035bdff0051UL), Proxy(typeof(TestCallOrder_Proxy)), Skeleton(typeof(TestCallOrder_Skeleton))] public interface ITestCallOrder : IDisposable { - Task GetCallSequence(uint Expected, CancellationToken cancellationToken_ = default); + Task GetCallSequence(uint expected, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa0e77035bdff0051UL)] public class TestCallOrder_Proxy : Proxy, ITestCallOrder { - public async Task GetCallSequence(uint Expected, CancellationToken cancellationToken_ = default) + public async Task GetCallSequence(uint expected, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestCallOrder.Params_GetCallSequence() - {Expected = Expected}; + {Expected = expected}; arg_?.serialize(in_); using (var d_ = await Call(11594359141811814481UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -11569,6 +11586,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa0e77035bdff0051UL)] public class TestCallOrder_Skeleton : Skeleton { public TestCallOrder_Skeleton() @@ -11721,16 +11739,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddd699207eb8e23bUL), Proxy(typeof(TestTailCallee_Proxy)), Skeleton(typeof(TestTailCallee_Skeleton))] public interface ITestTailCallee : IDisposable { - Task Foo(int I, string T, CancellationToken cancellationToken_ = default); + Task Foo(int i, string t, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddd699207eb8e23bUL)] public class TestTailCallee_Proxy : Proxy, ITestTailCallee { - public Task Foo(int I, string T, CancellationToken cancellationToken_ = default) + public Task Foo(int i, string t, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestTailCallee.Params_Foo() - {I = I, T = T}; + {I = i, T = t}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(15985132292242203195UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -11745,6 +11764,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddd699207eb8e23bUL)] public class TestTailCallee_Skeleton : Skeleton { public TestTailCallee_Skeleton() @@ -11941,16 +11961,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x870bf40110ce3035UL), Proxy(typeof(TestTailCaller_Proxy)), Skeleton(typeof(TestTailCaller_Skeleton))] public interface ITestTailCaller : IDisposable { - Task Foo(int I, Capnproto_test.Capnp.Test.ITestTailCallee Callee, CancellationToken cancellationToken_ = default); + Task Foo(int i, Capnproto_test.Capnp.Test.ITestTailCallee callee, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x870bf40110ce3035UL)] public class TestTailCaller_Proxy : Proxy, ITestTailCaller { - public Task Foo(int I, Capnproto_test.Capnp.Test.ITestTailCallee Callee, CancellationToken cancellationToken_ = default) + public Task Foo(int i, Capnproto_test.Capnp.Test.ITestTailCallee callee, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestTailCaller.Params_Foo() - {I = I, Callee = Callee}; + {I = i, Callee = callee}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(9731139705278181429UL, 0, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -11965,6 +11986,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x870bf40110ce3035UL)] public class TestTailCaller_Skeleton : Skeleton { public TestTailCaller_Skeleton() @@ -12073,10 +12095,12 @@ namespace Capnproto_test.Capnp.Test { } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa38e5efe41e53a15UL)] public class TestHandle_Proxy : Proxy, ITestHandle { } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xa38e5efe41e53a15UL)] public class TestHandle_Skeleton : Skeleton { public TestHandle_Skeleton() @@ -12090,28 +12114,29 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddc70bf9784133cfUL), Proxy(typeof(TestMoreStuff_Proxy)), Skeleton(typeof(TestMoreStuff_Skeleton))] public interface ITestMoreStuff : Capnproto_test.Capnp.Test.ITestCallOrder { - Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task Hold(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); + Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task Hold(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); Task CallHeld(CancellationToken cancellationToken_ = default); Task GetHeld(CancellationToken cancellationToken_ = default); - Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder Cap, CancellationToken cancellationToken_ = default); - Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default); - Task<(string, string)> MethodWithDefaults(string A, uint B, string C, CancellationToken cancellationToken_ = default); + Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder cap, CancellationToken cancellationToken_ = default); + Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); + Task<(string, string)> MethodWithDefaults(string a, uint b, string c, CancellationToken cancellationToken_ = default); Task GetHandle(CancellationToken cancellationToken_ = default); Task GetNull(CancellationToken cancellationToken_ = default); Task GetEnormousString(CancellationToken cancellationToken_ = default); - Task MethodWithNullDefault(string A, Capnproto_test.Capnp.Test.ITestInterface B, CancellationToken cancellationToken_ = default); + Task MethodWithNullDefault(string a, Capnproto_test.Capnp.Test.ITestInterface b, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddc70bf9784133cfUL)] public class TestMoreStuff_Proxy : Proxy, ITestMoreStuff { - public async Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_CallFoo() - {Cap = Cap}; + {Cap = cap}; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12120,11 +12145,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task CallFooWhenResolved(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_CallFooWhenResolved() - {Cap = Cap}; + {Cap = cap}; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 1, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12133,11 +12158,11 @@ namespace Capnproto_test.Capnp.Test } } - public Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public Task NeverReturn(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_NeverReturn() - {Cap = Cap}; + {Cap = cap}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(15980754968839795663UL, 2, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -12151,11 +12176,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task Hold(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task Hold(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_Hold() - {Cap = Cap}; + {Cap = cap}; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 3, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12195,11 +12220,11 @@ namespace Capnproto_test.Capnp.Test ); } - public Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder Cap, CancellationToken cancellationToken_ = default) + public Task Echo(Capnproto_test.Capnp.Test.ITestCallOrder cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_Echo() - {Cap = Cap}; + {Cap = cap}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(15980754968839795663UL, 6, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -12213,11 +12238,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface Cap, CancellationToken cancellationToken_ = default) + public async Task ExpectCancel(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_ExpectCancel() - {Cap = Cap}; + {Cap = cap}; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 7, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12226,11 +12251,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task<(string, string)> MethodWithDefaults(string A, uint B, string C, CancellationToken cancellationToken_ = default) + public async Task<(string, string)> MethodWithDefaults(string a, uint b, string c, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_MethodWithDefaults() - {A = A, B = B, C = C}; + {A = a, B = b, C = c}; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 8, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12288,11 +12313,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task MethodWithNullDefault(string A, Capnproto_test.Capnp.Test.ITestInterface B, CancellationToken cancellationToken_ = default) + public async Task MethodWithNullDefault(string a, Capnproto_test.Capnp.Test.ITestInterface b, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMoreStuff.Params_MethodWithNullDefault() - {A = A, B = B}; + {A = a, B = b}; arg_?.serialize(in_); using (var d_ = await Call(15980754968839795663UL, 12, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12301,11 +12326,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task GetCallSequence(uint Expected, CancellationToken cancellationToken_ = default) + public async Task GetCallSequence(uint expected, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestCallOrder.Params_GetCallSequence() - {Expected = Expected}; + {Expected = expected}; arg_?.serialize(in_); using (var d_ = await Call(11594359141811814481UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -12315,6 +12340,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xddc70bf9784133cfUL)] public class TestMoreStuff_Skeleton : Skeleton { public TestMoreStuff_Skeleton() @@ -14032,12 +14058,13 @@ namespace Capnproto_test.Capnp.Test public interface ITestMembrane : IDisposable { Task MakeThing(CancellationToken cancellationToken_ = default); - Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default); - Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default); - Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, CancellationToken cancellationToken_ = default); + Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default); + Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default); + Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, CancellationToken cancellationToken_ = default); Task WaitForever(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc07d8dcd80a69c0cUL)] public class TestMembrane_Proxy : Proxy, ITestMembrane { public Task MakeThing(CancellationToken cancellationToken_ = default) @@ -14058,11 +14085,11 @@ namespace Capnproto_test.Capnp.Test ); } - public async Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default) + public async Task CallPassThrough(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMembrane.Params_CallPassThrough() - {Thing = Thing, TailCall = TailCall}; + {Thing = thing, TailCall = tailCall}; arg_?.serialize(in_); using (var d_ = await Call(13870398341137210380UL, 1, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -14071,11 +14098,11 @@ namespace Capnproto_test.Capnp.Test } } - public async Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, bool TailCall, CancellationToken cancellationToken_ = default) + public async Task CallIntercept(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, bool tailCall, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMembrane.Params_CallIntercept() - {Thing = Thing, TailCall = TailCall}; + {Thing = thing, TailCall = tailCall}; arg_?.serialize(in_); using (var d_ = await Call(13870398341137210380UL, 2, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -14084,11 +14111,11 @@ namespace Capnproto_test.Capnp.Test } } - public Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing Thing, CancellationToken cancellationToken_ = default) + public Task Loopback(Capnproto_test.Capnp.Test.TestMembrane.IThing thing, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestMembrane.Params_Loopback() - {Thing = Thing}; + {Thing = thing}; arg_?.serialize(in_); return Impatient.MakePipelineAware(Call(13870398341137210380UL, 3, in_.Rewrap(), false, cancellationToken_), d_ => { @@ -14116,6 +14143,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xc07d8dcd80a69c0cUL)] public class TestMembrane_Skeleton : Skeleton { public TestMembrane_Skeleton() @@ -14209,6 +14237,7 @@ namespace Capnproto_test.Capnp.Test Task Intercept(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9352e4e41f173917UL)] public class Thing_Proxy : Proxy, IThing { public async Task PassThrough(CancellationToken cancellationToken_ = default) @@ -14238,6 +14267,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9352e4e41f173917UL)] public class Thing_Skeleton : Skeleton { public Thing_Skeleton() @@ -15115,6 +15145,7 @@ namespace Capnproto_test.Capnp.Test Task Return(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9ae342d394247cfcUL)] public class TestKeywordMethods_Proxy : Proxy, ITestKeywordMethods { public async Task Delete(CancellationToken cancellationToken_ = default) @@ -15170,6 +15201,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0x9ae342d394247cfcUL)] public class TestKeywordMethods_Skeleton : Skeleton { public TestKeywordMethods_Skeleton() @@ -15588,6 +15620,7 @@ namespace Capnproto_test.Capnp.Test Task GetCallerId(CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xea72cc77253798cdUL)] public class TestAuthenticatedBootstrap_Proxy : Proxy, ITestAuthenticatedBootstrap where TVatId : class { public Task GetCallerId(CancellationToken cancellationToken_ = default) @@ -15609,6 +15642,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xea72cc77253798cdUL)] public class TestAuthenticatedBootstrap_Skeleton : Skeleton> where TVatId : class { public TestAuthenticatedBootstrap_Skeleton() @@ -16565,16 +16599,17 @@ namespace Capnproto_test.Capnp.Test [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xd112a69d31ed918bUL), Proxy(typeof(TestNameAnnotationInterface_Proxy)), Skeleton(typeof(TestNameAnnotationInterface_Skeleton))] public interface ITestNameAnnotationInterface : IDisposable { - Task BadlyNamedMethod(byte BadlyNamedParam, CancellationToken cancellationToken_ = default); + Task BadlyNamedMethod(byte badlyNamedParam, CancellationToken cancellationToken_ = default); } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xd112a69d31ed918bUL)] public class TestNameAnnotationInterface_Proxy : Proxy, ITestNameAnnotationInterface { - public async Task BadlyNamedMethod(byte BadlyNamedParam, CancellationToken cancellationToken_ = default) + public async Task BadlyNamedMethod(byte badlyNamedParam, CancellationToken cancellationToken_ = default) { var in_ = SerializerState.CreateForRpc(); var arg_ = new Capnproto_test.Capnp.Test.TestNameAnnotationInterface.Params_BadlyNamedMethod() - {BadlyNamedParam = BadlyNamedParam}; + {BadlyNamedParam = badlyNamedParam}; arg_?.serialize(in_); using (var d_ = await Call(15065286897585459595UL, 0, in_.Rewrap(), false, cancellationToken_).WhenReturned) { @@ -16584,6 +16619,7 @@ namespace Capnproto_test.Capnp.Test } } + [System.CodeDom.Compiler.GeneratedCode("capnpc-csharp", "1.3.0.0"), TypeId(0xd112a69d31ed918bUL)] public class TestNameAnnotationInterface_Skeleton : Skeleton { public TestNameAnnotationInterface_Skeleton() diff --git a/CapnpC.CSharp.Generator/CodeGen/GenNames.cs b/CapnpC.CSharp.Generator/CodeGen/GenNames.cs index 1c3ac6b..5d3d0de 100644 --- a/CapnpC.CSharp.Generator/CodeGen/GenNames.cs +++ b/CapnpC.CSharp.Generator/CodeGen/GenNames.cs @@ -47,7 +47,6 @@ namespace CapnpC.CSharp.Generator.CodeGen public Name ReaderContextField { get; } public Name ContextParameter { get; } public Name GroupReaderContextArg { get; } - public Name GroupWriterContextArg { get; } public Name UnionDiscriminatorEnum { get; } public Name UnionDiscriminatorProp { get; } public Name UnionDiscriminatorUndefined { get; } @@ -61,14 +60,12 @@ namespace CapnpC.CSharp.Generator.CodeGen public Name ResultLocal { get; } public Name SerializeMethod { get; } public Name ApplyDefaultsMethod { get; } - public Name InstLocalName { get; } public string ParamsStructFormat { get; } public string ResultStructFormat { get; } public string PropertyNamedLikeTypeRenameFormat { get; } public string GenericTypeParameterFormat { get; } public string MemberAccessPathNameFormat { get; } public Name TaskParameter { get; } - public Name EagerMethod { get; } public Name TypeIdField { get; } public string PipeliningExtensionsClassFormat { get; } public string ProxyClassFormat { get; } @@ -91,7 +88,6 @@ namespace CapnpC.CSharp.Generator.CodeGen ReaderContextField = new Name(options.ReaderContextFieldName); ContextParameter = new Name(options.ContextParameterName); GroupReaderContextArg = new Name(options.GroupReaderContextArgName); - GroupWriterContextArg = new Name(options.GroupWriterContextArgName); UnionDiscriminatorEnum = new Name(options.UnionDiscriminatorEnumName); UnionDiscriminatorProp = new Name(options.UnionDiscriminatorPropName); UnionDiscriminatorUndefined = new Name(options.UnionDiscriminatorUndefinedName); @@ -105,14 +101,12 @@ namespace CapnpC.CSharp.Generator.CodeGen DeserializerLocal = new Name(options.DeserializerLocalName); SerializerLocal = new Name(options.SerializerLocalName); ResultLocal = new Name(options.ResultLocalName); - InstLocalName = new Name(options.InstLocalName); ParamsStructFormat = options.ParamsStructFormat; ResultStructFormat = options.ResultStructFormat; PropertyNamedLikeTypeRenameFormat = options.PropertyNamedLikeTypeRenameFormat; GenericTypeParameterFormat = options.GenericTypeParameterFormat; MemberAccessPathNameFormat = options.MemberAccessPathNameFormat; TaskParameter = new Name(options.TaskParameterName); - EagerMethod = new Name(options.EagerMethodName); TypeIdField = new Name(options.TypeIdFieldName); PipeliningExtensionsClassFormat = options.PipeliningExtensionsClassFormat; ProxyClassFormat = options.ProxyClassFormat; @@ -594,7 +588,7 @@ namespace CapnpC.CSharp.Generator.CodeGen } string GetCodeIdentifierUpperCamel(Field field) => field.CsName ?? SyntaxHelpers.MakeUpperCamel(field.Name); - string GetCodeIdentifierLowerCamel(Field field) => field.CsName ?? IdentifierRenamer.ToNonKeyword(SyntaxHelpers.MakeLowerCamel(field.Name)); + public string GetCodeIdentifierLowerCamel(Field field) => field.CsName ?? IdentifierRenamer.ToNonKeyword(SyntaxHelpers.MakeLowerCamel(field.Name)); public Name GetCodeIdentifier(Field field) { @@ -605,13 +599,6 @@ namespace CapnpC.CSharp.Generator.CodeGen var def = field.DeclaringType; - if (def == null) - { - // Method parameters are internally represented with the same class "Field". - // They do not have a declaring type. Anyway, they don't suffer from the field-name-equals-nested-type-name problem. - return new Name(GetCodeIdentifierLowerCamel(field)); - } - var typeNames = new HashSet(def.NestedTypes.Select(t => MakeTypeName(t))); typeNames.Add(MakeTypeName(def)); @@ -647,10 +634,7 @@ namespace CapnpC.CSharp.Generator.CodeGen public Name MakePipeliningSupportExtensionMethodName(IReadOnlyList path) { - if (path.Count == 1 && path[0].Offset == 0) - return EagerMethod; - else - return new Name(string.Join("_", path.Select(f => GetCodeIdentifier(f).ToString()))); + return new Name(string.Join("_", path.Select(f => GetCodeIdentifier(f).ToString()))); } public Name MakePipeliningSupportExtensionClassName(GenFile file) diff --git a/CapnpC.CSharp.Generator/CodeGen/GeneratorOptions.cs b/CapnpC.CSharp.Generator/CodeGen/GeneratorOptions.cs index cd6061f..133cfa4 100644 --- a/CapnpC.CSharp.Generator/CodeGen/GeneratorOptions.cs +++ b/CapnpC.CSharp.Generator/CodeGen/GeneratorOptions.cs @@ -11,7 +11,6 @@ public string ReaderContextFieldName { get; set; } = "ctx"; public string ContextParameterName { get; set; } = "ctx"; public string GroupReaderContextArgName { get; set; } = "ctx"; - public string GroupWriterContextArgName { get; set; } = "ctx"; public string UnionDiscriminatorEnumName { get; set; } = "WHICH"; public string UnionDiscriminatorPropName { get; set; } = "which"; public string UnionDiscriminatorFieldName { get; set; } = "_which"; @@ -28,14 +27,12 @@ public string ParamsStructFormat { get; set; } = "Params_{0}"; public string ResultStructFormat { get; set; } = "Result_{0}"; public string PropertyNamedLikeTypeRenameFormat { get; set; } = "The{0}"; - public string InstLocalName { get; set; } = "inst"; public string GenericTypeParameterFormat { get; set; } = "T{0}"; public string PipeliningExtensionsClassFormat { get; set; } = "PipeliningSupportExtensions_{0}"; public string ProxyClassFormat { get; set; } = "{0}_Proxy"; public string SkeletonClassFormat { get; set; } = "{0}_Skeleton"; public string MemberAccessPathNameFormat { get; set; } = "Path_{0}_{1}_{2}_{3}"; public string TaskParameterName { get; set; } = "task"; - public string EagerMethodName { get; set; } = "Eager"; public string TypeIdFieldName { get; set; } = "typeId"; public string AwaitProxyName { get; set; } = "AwaitProxy"; public bool NullableEnableDefault { get; set; } = false; diff --git a/CapnpC.CSharp.Generator/CodeGen/InterfaceSnippetGen.cs b/CapnpC.CSharp.Generator/CodeGen/InterfaceSnippetGen.cs index d3f2076..398286b 100644 --- a/CapnpC.CSharp.Generator/CodeGen/InterfaceSnippetGen.cs +++ b/CapnpC.CSharp.Generator/CodeGen/InterfaceSnippetGen.cs @@ -61,7 +61,7 @@ namespace CapnpC.CSharp.Generator.CodeGen { foreach (var arg in method.Params) { - list.Add(Parameter(_names.GetCodeIdentifier(arg).Identifier) + list.Add(Parameter(Identifier(_names.GetCodeIdentifierLowerCamel(arg))) .WithType(_names.MakeTypeSyntax(arg.Type, method.DeclaringInterface, TypeUsage.DomainClass, Nullability.NullableRef))); } } @@ -194,8 +194,8 @@ namespace CapnpC.CSharp.Generator.CodeGen yield return AssignmentExpression( SyntaxKind.SimpleAssignmentExpression, - _names.GetCodeIdentifier(field).IdentifierName, - _names.GetCodeIdentifier(methodParam).IdentifierName); + _names.GetCodeIdentifier(methodParam).IdentifierName, + IdentifierName(_names.GetCodeIdentifierLowerCamel(field))); } } @@ -284,6 +284,7 @@ namespace CapnpC.CSharp.Generator.CodeGen public MemberDeclarationSyntax MakeProxy(TypeDefinition type) { var classDecl = ClassDeclaration(_names.MakeTypeName(type, NameUsage.Proxy).Identifier) + .AddAttributeLists(_names.MakeTypeDecorationAttributes(type.Id)) .AddModifiers(Public) .AddBaseListTypes( SimpleBaseType(_names.Type(Nullability.NonNullable)), @@ -480,7 +481,7 @@ namespace CapnpC.CSharp.Generator.CodeGen yield return AssignmentExpression( SyntaxKind.SimpleAssignmentExpression, _names.GetCodeIdentifier(arg).IdentifierName, - IdentifierName(IdentifierRenamer.ToNonKeyword(arg.Name))); + IdentifierName(_names.GetCodeIdentifierLowerCamel(arg))); } } @@ -650,7 +651,7 @@ namespace CapnpC.CSharp.Generator.CodeGen if (method.Results.Count == 1) { lambdaArg = SimpleLambdaExpression( - Parameter(Identifier(method.Results.Single().Name)), + Parameter(Identifier(_names.GetCodeIdentifierLowerCamel(method.Results.Single()))), MakeMaybeTailCallLambdaBody(method)); } else @@ -662,7 +663,7 @@ namespace CapnpC.CSharp.Generator.CodeGen { if (paramList.Count > 0) paramList.Add(Token(SyntaxKind.CommaToken)); - paramList.Add(Parameter(Identifier(arg.Name))); + paramList.Add(Parameter(Identifier(_names.GetCodeIdentifierLowerCamel(arg)))); } lambdaArg = ParenthesizedLambdaExpression( ParameterList( @@ -729,6 +730,7 @@ namespace CapnpC.CSharp.Generator.CodeGen { var name = _names.MakeTypeName(type, NameUsage.Skeleton).Identifier; var classDecl = ClassDeclaration(name) + .AddAttributeLists(_names.MakeTypeDecorationAttributes(type.Id)) .AddModifiers(Public) .AddBaseListTypes( SimpleBaseType(