From cb02be389689d86e93d7e0661d2ceaf52e082510 Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 13:58:28 -0400 Subject: [PATCH 1/7] Implement hex-base ulong literal. --- capnpc-csharp/Generator/CommonSnippetGen.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/capnpc-csharp/Generator/CommonSnippetGen.cs b/capnpc-csharp/Generator/CommonSnippetGen.cs index 2e1797d..ddb9867 100644 --- a/capnpc-csharp/Generator/CommonSnippetGen.cs +++ b/capnpc-csharp/Generator/CommonSnippetGen.cs @@ -89,5 +89,9 @@ namespace CapnpC.Generator } } + static LiteralExpressionSyntax HexLiteral(ulong id) => + LiteralExpression( + SyntaxKind.NumericLiteralExpression, + Literal($"0x{id:x}UL", id)); } } From 64203d1638ba9c0aede7a9ed3b82c0dd9ad77a8b Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 14:00:10 -0400 Subject: [PATCH 2/7] Implement TypeId const member. --- capnpc-csharp/Generator/CommonSnippetGen.cs | 15 +++++++++++++++ capnpc-csharp/Generator/GenNames.cs | 2 ++ capnpc-csharp/Generator/GeneratorOptions.cs | 1 + 3 files changed, 18 insertions(+) diff --git a/capnpc-csharp/Generator/CommonSnippetGen.cs b/capnpc-csharp/Generator/CommonSnippetGen.cs index ddb9867..56d974e 100644 --- a/capnpc-csharp/Generator/CommonSnippetGen.cs +++ b/capnpc-csharp/Generator/CommonSnippetGen.cs @@ -93,5 +93,20 @@ namespace CapnpC.Generator LiteralExpression( SyntaxKind.NumericLiteralExpression, Literal($"0x{id:x}UL", id)); + + public static FieldDeclarationSyntax MakeTypeIdConst(ulong id, GenNames names) => + FieldDeclaration( + VariableDeclaration( + IdentifierName("UInt64")) + .WithVariables( + SingletonSeparatedList( + VariableDeclarator(names.TypeIdField.Identifier) + .WithInitializer( + EqualsValueClause(HexLiteral(id)))))) + .WithModifiers( + TokenList( + new[]{ + Token(SyntaxKind.PublicKeyword), + Token(SyntaxKind.ConstKeyword)})); } } diff --git a/capnpc-csharp/Generator/GenNames.cs b/capnpc-csharp/Generator/GenNames.cs index f842413..e4620d0 100644 --- a/capnpc-csharp/Generator/GenNames.cs +++ b/capnpc-csharp/Generator/GenNames.cs @@ -63,6 +63,7 @@ namespace CapnpC.Generator public string MemberAccessPathNameFormat { get; } public Name TaskParameter { get; } public Name EagerMethod { get; } + public Name TypeIdField { get; } public GenNames(GeneratorOptions options) { @@ -98,6 +99,7 @@ namespace CapnpC.Generator MemberAccessPathNameFormat = options.MemberAccessPathNameFormat; TaskParameter = new Name(options.TaskParameterName); EagerMethod = new Name(options.EagerMethodName); + TypeIdField = new Name(options.TypeIdFieldName); } public Name MakeTypeName(TypeDefinition def, NameUsage usage = NameUsage.Default) diff --git a/capnpc-csharp/Generator/GeneratorOptions.cs b/capnpc-csharp/Generator/GeneratorOptions.cs index 76faf93..58a0d80 100644 --- a/capnpc-csharp/Generator/GeneratorOptions.cs +++ b/capnpc-csharp/Generator/GeneratorOptions.cs @@ -38,5 +38,6 @@ namespace CapnpC.Generator public string MemberAccessPathNameFormat { get; set; } = "Path_{0}_{1}"; public string TaskParameterName { get; set; } = "task"; public string EagerMethodName { get; set; } = "Eager"; + public string TypeIdFieldName { get; set; } = "TypeId"; } } From 056a5101ffc8bfd2a7709995871b216da02cbf07 Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 14:00:30 -0400 Subject: [PATCH 3/7] Add TypeId const member to structs. --- .../Embedded Resources/test.cs | 163 ++++++++++++++++++ capnpc-csharp/Generator/CodeGenerator.cs | 2 + 2 files changed, 165 insertions(+) diff --git a/capnpc-csharp.tests/Embedded Resources/test.cs b/capnpc-csharp.tests/Embedded Resources/test.cs index d20da0b..ce514b6 100644 --- a/capnpc-csharp.tests/Embedded Resources/test.cs +++ b/capnpc-csharp.tests/Embedded Resources/test.cs @@ -21,6 +21,7 @@ namespace Capnproto_test.Capnp.Test public class TestAllTypes : ICapnpSerializable { + public const UInt64 TypeId = 0xa0a8f314b80b63fdUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -544,6 +545,7 @@ namespace Capnproto_test.Capnp.Test public class TestDefaults : ICapnpSerializable { + public const UInt64 TypeId = 0xeb3f9ebe98c73cb6UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -1114,6 +1116,7 @@ namespace Capnproto_test.Capnp.Test public class TestAnyPointer : ICapnpSerializable { + public const UInt64 TypeId = 0xe3da5a2ccd28c0d8UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -1172,6 +1175,7 @@ namespace Capnproto_test.Capnp.Test public class TestAnyOthers : ICapnpSerializable { + public const UInt64 TypeId = 0xf49850f63c2bfa59UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -1260,6 +1264,7 @@ namespace Capnproto_test.Capnp.Test public class TestOutOfOrder : ICapnpSerializable { + public const UInt64 TypeId = 0xa9d5f8efe770022bUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -1438,6 +1443,7 @@ namespace Capnproto_test.Capnp.Test public class TestUnion : ICapnpSerializable { + public const UInt64 TypeId = 0xf47697362233ce52UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -1656,6 +1662,7 @@ namespace Capnproto_test.Capnp.Test public class @union0 : ICapnpSerializable { + public const UInt64 TypeId = 0xfc76a82eecb7a718UL; public enum WHICH : ushort { U0f0s0 = 0, @@ -2074,6 +2081,7 @@ namespace Capnproto_test.Capnp.Test public class @union1 : ICapnpSerializable { + public const UInt64 TypeId = 0xee0a6b99b7dc7ab2UL; public enum WHICH : ushort { U1f0s0 = 0, @@ -2654,6 +2662,7 @@ namespace Capnproto_test.Capnp.Test public class @union2 : ICapnpSerializable { + public const UInt64 TypeId = 0xafc5fd419f0d66d4UL; public enum WHICH : ushort { U2f0s1 = 0, @@ -2867,6 +2876,7 @@ namespace Capnproto_test.Capnp.Test public class @union3 : ICapnpSerializable { + public const UInt64 TypeId = 0xa2fb022ec7f30053UL; public enum WHICH : ushort { U3f0s1 = 0, @@ -3081,6 +3091,7 @@ namespace Capnproto_test.Capnp.Test public class TestUnnamedUnion : ICapnpSerializable { + public const UInt64 TypeId = 0x9e2e784c915329b6UL; public enum WHICH : ushort { Foo = 0, @@ -3260,6 +3271,7 @@ namespace Capnproto_test.Capnp.Test public class TestUnionInUnion : ICapnpSerializable { + public const UInt64 TypeId = 0x89a9494f1b900f22UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -3316,6 +3328,7 @@ namespace Capnproto_test.Capnp.Test public class @outer : ICapnpSerializable { + public const UInt64 TypeId = 0xd005f6c63707670cUL; public enum WHICH : ushort { Inner = 0, @@ -3446,6 +3459,7 @@ namespace Capnproto_test.Capnp.Test public class @inner : ICapnpSerializable { + public const UInt64 TypeId = 0xff9ce111c6f8e5dbUL; public enum WHICH : ushort { Foo = 0, @@ -3580,6 +3594,7 @@ namespace Capnproto_test.Capnp.Test public class TestGroups : ICapnpSerializable { + public const UInt64 TypeId = 0xdc841556134c3103UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -3636,6 +3651,7 @@ namespace Capnproto_test.Capnp.Test public class @groups : ICapnpSerializable { + public const UInt64 TypeId = 0xe22ae74ff9113268UL; public enum WHICH : ushort { Foo = 0, @@ -3791,6 +3807,7 @@ namespace Capnproto_test.Capnp.Test public class @foo : ICapnpSerializable { + public const UInt64 TypeId = 0xf5fcba89c0c1196fUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -3878,6 +3895,7 @@ namespace Capnproto_test.Capnp.Test public class @baz : ICapnpSerializable { + public const UInt64 TypeId = 0xf0fa30304066a4b3UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -3965,6 +3983,7 @@ namespace Capnproto_test.Capnp.Test public class @bar : ICapnpSerializable { + public const UInt64 TypeId = 0xb727c0d0091a001dUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -4054,6 +4073,7 @@ namespace Capnproto_test.Capnp.Test public class TestInterleavedGroups : ICapnpSerializable { + public const UInt64 TypeId = 0xf77ed6f7454eec40UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -4124,6 +4144,7 @@ namespace Capnproto_test.Capnp.Test public class @group1 : ICapnpSerializable { + public const UInt64 TypeId = 0xc7485a3516c7d3c8UL; public enum WHICH : ushort { Qux = 0, @@ -4327,6 +4348,7 @@ namespace Capnproto_test.Capnp.Test public class @corge : ICapnpSerializable { + public const UInt64 TypeId = 0xdb0afd413f4a313aUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -4430,6 +4452,7 @@ namespace Capnproto_test.Capnp.Test public class @group2 : ICapnpSerializable { + public const UInt64 TypeId = 0xcc85a335569990e9UL; public enum WHICH : ushort { Qux = 0, @@ -4633,6 +4656,7 @@ namespace Capnproto_test.Capnp.Test public class @corge : ICapnpSerializable { + public const UInt64 TypeId = 0xa017f0366827ee37UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -4737,6 +4761,7 @@ namespace Capnproto_test.Capnp.Test public class TestUnionDefaults : ICapnpSerializable { + public const UInt64 TypeId = 0x94f7e0b103b4b718UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -4856,6 +4881,7 @@ namespace Capnproto_test.Capnp.Test public class TestNestedTypes : ICapnpSerializable { + public const UInt64 TypeId = 0xd9f2b5941a343bcdUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -4951,6 +4977,7 @@ namespace Capnproto_test.Capnp.Test public class NestedStruct : ICapnpSerializable { + public const UInt64 TypeId = 0x82cd03a53b29d76bUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5034,6 +5061,7 @@ namespace Capnproto_test.Capnp.Test public class TestUsing : ICapnpSerializable { + public const UInt64 TypeId = 0xe78aac389e77b065UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5109,6 +5137,7 @@ namespace Capnproto_test.Capnp.Test public class TestLists : ICapnpSerializable { + public const UInt64 TypeId = 0xe41885c94393277eUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5301,6 +5330,7 @@ namespace Capnproto_test.Capnp.Test public class Struct0 : ICapnpSerializable { + public const UInt64 TypeId = 0x8412c03b75b2cfeeUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5344,6 +5374,7 @@ namespace Capnproto_test.Capnp.Test public class Struct1 : ICapnpSerializable { + public const UInt64 TypeId = 0xe0fe5870b141ad69UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5402,6 +5433,7 @@ namespace Capnproto_test.Capnp.Test public class Struct8 : ICapnpSerializable { + public const UInt64 TypeId = 0xa6411a353090145bUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5460,6 +5492,7 @@ namespace Capnproto_test.Capnp.Test public class Struct16 : ICapnpSerializable { + public const UInt64 TypeId = 0xa8abf7a82928986cUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5518,6 +5551,7 @@ namespace Capnproto_test.Capnp.Test public class Struct32 : ICapnpSerializable { + public const UInt64 TypeId = 0xad7beedc4ed30742UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5576,6 +5610,7 @@ namespace Capnproto_test.Capnp.Test public class Struct64 : ICapnpSerializable { + public const UInt64 TypeId = 0xef9a34f2ff7cc646UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5634,6 +5669,7 @@ namespace Capnproto_test.Capnp.Test public class StructP : ICapnpSerializable { + public const UInt64 TypeId = 0xc6abf1b0329e6227UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5692,6 +5728,7 @@ namespace Capnproto_test.Capnp.Test public class Struct0c : ICapnpSerializable { + public const UInt64 TypeId = 0x943a234ca336b16aUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5750,6 +5787,7 @@ namespace Capnproto_test.Capnp.Test public class Struct1c : ICapnpSerializable { + public const UInt64 TypeId = 0x8991bc0e74a594cdUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5823,6 +5861,7 @@ namespace Capnproto_test.Capnp.Test public class Struct8c : ICapnpSerializable { + public const UInt64 TypeId = 0xed267416528c7a24UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5896,6 +5935,7 @@ namespace Capnproto_test.Capnp.Test public class Struct16c : ICapnpSerializable { + public const UInt64 TypeId = 0x9978837b037d58e6UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -5969,6 +6009,7 @@ namespace Capnproto_test.Capnp.Test public class Struct32c : ICapnpSerializable { + public const UInt64 TypeId = 0xed5fa940f54a7904UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -6042,6 +6083,7 @@ namespace Capnproto_test.Capnp.Test public class Struct64c : ICapnpSerializable { + public const UInt64 TypeId = 0xbc743778f2597c7dUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -6115,6 +6157,7 @@ namespace Capnproto_test.Capnp.Test public class StructPc : ICapnpSerializable { + public const UInt64 TypeId = 0xc2e364a40182013dUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -6189,6 +6232,7 @@ namespace Capnproto_test.Capnp.Test public class TestFieldZeroIsBit : ICapnpSerializable { + public const UInt64 TypeId = 0x92fc29a80f3ddd5cUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -6279,6 +6323,7 @@ namespace Capnproto_test.Capnp.Test public class TestListDefaults : ICapnpSerializable { + public const UInt64 TypeId = 0xa851ad32cbc2ffeaUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -6361,6 +6406,7 @@ namespace Capnproto_test.Capnp.Test public class TestLateUnion : ICapnpSerializable { + public const UInt64 TypeId = 0xa76e3c9bb7fd56d3UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -6476,6 +6522,7 @@ namespace Capnproto_test.Capnp.Test public class @theUnion : ICapnpSerializable { + public const UInt64 TypeId = 0x807280a2901aa079UL; public enum WHICH : ushort { Qux = 0, @@ -6635,6 +6682,7 @@ namespace Capnproto_test.Capnp.Test public class @anotherUnion : ICapnpSerializable { + public const UInt64 TypeId = 0xc1973984dee98e3aUL; public enum WHICH : ushort { Qux = 0, @@ -6795,6 +6843,7 @@ namespace Capnproto_test.Capnp.Test public class TestOldVersion : ICapnpSerializable { + public const UInt64 TypeId = 0x95b30dd14e01dda8UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -6883,6 +6932,7 @@ namespace Capnproto_test.Capnp.Test public class TestNewVersion : ICapnpSerializable { + public const UInt64 TypeId = 0x8ed75a7469f04ce3UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -7003,6 +7053,7 @@ namespace Capnproto_test.Capnp.Test public class TestOldUnionVersion : ICapnpSerializable { + public const UInt64 TypeId = 0xbd5fe16e5170c492UL; public enum WHICH : ushort { A = 0, @@ -7117,6 +7168,7 @@ namespace Capnproto_test.Capnp.Test public class TestNewUnionVersion : ICapnpSerializable { + public const UInt64 TypeId = 0xc7e4c513a975492bUL; public enum WHICH : ushort { A = 0, @@ -7248,6 +7300,7 @@ namespace Capnproto_test.Capnp.Test public class @a : ICapnpSerializable { + public const UInt64 TypeId = 0x86232c1de4513e84UL; public enum WHICH : ushort { A0 = 0, @@ -7362,6 +7415,7 @@ namespace Capnproto_test.Capnp.Test public class TestStructUnion : ICapnpSerializable { + public const UInt64 TypeId = 0xfaf781ef89a00e39UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -7418,6 +7472,7 @@ namespace Capnproto_test.Capnp.Test public class @un : ICapnpSerializable { + public const UInt64 TypeId = 0x992edc677bef5a3cUL; public enum WHICH : ushort { Struct = 0, @@ -7550,6 +7605,7 @@ namespace Capnproto_test.Capnp.Test public class SomeStruct : ICapnpSerializable { + public const UInt64 TypeId = 0x9daec9823f171085UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -7624,6 +7680,7 @@ namespace Capnproto_test.Capnp.Test public class TestPrintInlineStructs : ICapnpSerializable { + public const UInt64 TypeId = 0xdec497819d097c3cUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -7696,6 +7753,7 @@ namespace Capnproto_test.Capnp.Test public class InlineStruct : ICapnpSerializable { + public const UInt64 TypeId = 0x8e4936003708dac2UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -7770,6 +7828,7 @@ namespace Capnproto_test.Capnp.Test public class TestWholeFloatDefault : ICapnpSerializable { + public const UInt64 TypeId = 0x91afd4a864dbb030UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -7845,6 +7904,7 @@ namespace Capnproto_test.Capnp.Test public class TestGenerics : ICapnpSerializable where TFoo : class where TBar : class { + public const UInt64 TypeId = 0x9d5b8cd8de9922ebUL; public enum WHICH : ushort { Uv = 0, @@ -8003,6 +8063,7 @@ namespace Capnproto_test.Capnp.Test public class @ug : ICapnpSerializable { + public const UInt64 TypeId = 0xb46a779beaf3384eUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8060,6 +8121,7 @@ namespace Capnproto_test.Capnp.Test public class Inner : ICapnpSerializable { + public const UInt64 TypeId = 0xf6a841117e19ac73UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8133,6 +8195,7 @@ namespace Capnproto_test.Capnp.Test public class Inner2 : ICapnpSerializable where TBaz : class { + public const UInt64 TypeId = 0xa9ab42b118d6d435UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8235,6 +8298,7 @@ namespace Capnproto_test.Capnp.Test public class DeepNest : ICapnpSerializable where TQux : class { + public const UInt64 TypeId = 0xb6a0829c762b06f3UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8376,6 +8440,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_call : ICapnpSerializable { + public const UInt64 TypeId = 0xb84eecc799437049UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8419,6 +8484,7 @@ namespace Capnproto_test.Capnp.Test public class Result_call : ICapnpSerializable { + public const UInt64 TypeId = 0xe080f0fc54614f6fUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8512,6 +8578,7 @@ namespace Capnproto_test.Capnp.Test { public class Result_call : ICapnpSerializable { + public const UInt64 TypeId = 0xa5b46224e33581adUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8586,6 +8653,7 @@ namespace Capnproto_test.Capnp.Test public class UseAliases : ICapnpSerializable { + public const UInt64 TypeId = 0x8e656edfb45ba6cfUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8720,6 +8788,7 @@ namespace Capnproto_test.Capnp.Test public class TestGenericsWrapper : ICapnpSerializable where TFoo : class where TBar : class { + public const UInt64 TypeId = 0xa9b2b1f52dde845dUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8778,6 +8847,7 @@ namespace Capnproto_test.Capnp.Test public class TestGenericsWrapper2 : ICapnpSerializable { + public const UInt64 TypeId = 0xf28f83667a557a04UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -8887,6 +8957,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_call : ICapnpSerializable where TT : class where TU : class { + public const UInt64 TypeId = 0xf83f8caf54bdc486UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -9013,6 +9084,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_call : ICapnpSerializable where TT : class where TU : class { + public const UInt64 TypeId = 0x9aab8e25c808d71eUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -9087,6 +9159,7 @@ namespace Capnproto_test.Capnp.Test public class TestGenericsUnion : ICapnpSerializable where TFoo : class where TBar : class { + public const UInt64 TypeId = 0xa54870440e919063UL; public enum WHICH : ushort { Foo = 0, @@ -9220,6 +9293,7 @@ namespace Capnproto_test.Capnp.Test public class TestUseGenerics : ICapnpSerializable { + public const UInt64 TypeId = 0x9427b2a71030338fUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -9669,6 +9743,7 @@ namespace Capnproto_test.Capnp.Test public class TestEmptyStruct : ICapnpSerializable { + public const UInt64 TypeId = 0xc5598844441096dcUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -9712,6 +9787,7 @@ namespace Capnproto_test.Capnp.Test public class TestConstants : ICapnpSerializable { + public const UInt64 TypeId = 0xabed745cd8c92095UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -9755,6 +9831,7 @@ namespace Capnproto_test.Capnp.Test public class TestAnyPointerConstants : ICapnpSerializable { + public const UInt64 TypeId = 0xddc280dbee9c99b3UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -9942,6 +10019,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_foo : ICapnpSerializable { + public const UInt64 TypeId = 0xb874edc0d559b391UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10015,6 +10093,7 @@ namespace Capnproto_test.Capnp.Test public class Result_foo : ICapnpSerializable { + public const UInt64 TypeId = 0xb04fcaddab714ba4UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10073,6 +10152,7 @@ namespace Capnproto_test.Capnp.Test public class Params_bar : ICapnpSerializable { + public const UInt64 TypeId = 0xd044893357b42568UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10116,6 +10196,7 @@ namespace Capnproto_test.Capnp.Test public class Result_bar : ICapnpSerializable { + public const UInt64 TypeId = 0x9bf141df4247d52fUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10159,6 +10240,7 @@ namespace Capnproto_test.Capnp.Test public class Params_baz : ICapnpSerializable { + public const UInt64 TypeId = 0xd9ac8abb2a91cfbcUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10217,6 +10299,7 @@ namespace Capnproto_test.Capnp.Test public class Result_baz : ICapnpSerializable { + public const UInt64 TypeId = 0x9b99d14f2f375b2dUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10373,6 +10456,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_qux : ICapnpSerializable { + public const UInt64 TypeId = 0x83a4bc5471363f17UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10416,6 +10500,7 @@ namespace Capnproto_test.Capnp.Test public class Result_qux : ICapnpSerializable { + public const UInt64 TypeId = 0x8e4b3d1a3e2753ddUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10459,6 +10544,7 @@ namespace Capnproto_test.Capnp.Test public class Result_corge : ICapnpSerializable { + public const UInt64 TypeId = 0xacf67532a7e7bad9UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10502,6 +10588,7 @@ namespace Capnproto_test.Capnp.Test public class Params_grault : ICapnpSerializable { + public const UInt64 TypeId = 0xf3b834e851ea8af6UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10742,6 +10829,7 @@ namespace Capnproto_test.Capnp.Test { public class Box : ICapnpSerializable { + public const UInt64 TypeId = 0xb0b29e51db0e26b1UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10800,6 +10888,7 @@ namespace Capnproto_test.Capnp.Test public class AnyBox : ICapnpSerializable { + public const UInt64 TypeId = 0x9442ad5a1d2c8acbUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10858,6 +10947,7 @@ namespace Capnproto_test.Capnp.Test public class Params_getCap : ICapnpSerializable { + public const UInt64 TypeId = 0xc7e8df5096257034UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -10931,6 +11021,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getCap : ICapnpSerializable { + public const UInt64 TypeId = 0xb2442a9e0ba28fdfUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11004,6 +11095,7 @@ namespace Capnproto_test.Capnp.Test public class Params_testPointers : ICapnpSerializable { + public const UInt64 TypeId = 0xa604ee63cf37819fUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11092,6 +11184,7 @@ namespace Capnproto_test.Capnp.Test public class Result_testPointers : ICapnpSerializable { + public const UInt64 TypeId = 0x8eda54756c6070d6UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11135,6 +11228,7 @@ namespace Capnproto_test.Capnp.Test public class Params_getAnyCap : ICapnpSerializable { + public const UInt64 TypeId = 0xf8e36b53ab093d4eUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11208,6 +11302,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getAnyCap : ICapnpSerializable { + public const UInt64 TypeId = 0xbf44b4c94c26ef79UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11327,6 +11422,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_getCallSequence : ICapnpSerializable { + public const UInt64 TypeId = 0x8f1e8cd56ceb74dcUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11385,6 +11481,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getCallSequence : ICapnpSerializable { + public const UInt64 TypeId = 0xdedbb6bf3810eab7UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11501,6 +11598,7 @@ namespace Capnproto_test.Capnp.Test { public class TailResult : ICapnpSerializable { + public const UInt64 TypeId = 0xa9ed2e5a9fd53d19UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11589,6 +11687,7 @@ namespace Capnproto_test.Capnp.Test public class Params_foo : ICapnpSerializable { + public const UInt64 TypeId = 0xc5e1efc325614957UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -11715,6 +11814,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_foo : ICapnpSerializable { + public const UInt64 TypeId = 0xb07a279515dc8ac5UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12200,6 +12300,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_callFoo : ICapnpSerializable { + public const UInt64 TypeId = 0x931ba418da60f6e4UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12258,6 +12359,7 @@ namespace Capnproto_test.Capnp.Test public class Result_callFoo : ICapnpSerializable { + public const UInt64 TypeId = 0x9a28970beccecdd0UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12316,6 +12418,7 @@ namespace Capnproto_test.Capnp.Test public class Params_callFooWhenResolved : ICapnpSerializable { + public const UInt64 TypeId = 0xfabc700c2ebe6378UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12374,6 +12477,7 @@ namespace Capnproto_test.Capnp.Test public class Result_callFooWhenResolved : ICapnpSerializable { + public const UInt64 TypeId = 0xa54ce1e9aa822f90UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12432,6 +12536,7 @@ namespace Capnproto_test.Capnp.Test public class Params_neverReturn : ICapnpSerializable { + public const UInt64 TypeId = 0x94fe60465c95182bUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12490,6 +12595,7 @@ namespace Capnproto_test.Capnp.Test public class Result_neverReturn : ICapnpSerializable { + public const UInt64 TypeId = 0xdef4e5fa6999c5dcUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12548,6 +12654,7 @@ namespace Capnproto_test.Capnp.Test public class Params_hold : ICapnpSerializable { + public const UInt64 TypeId = 0xfe7c8fbb769d8e58UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12606,6 +12713,7 @@ namespace Capnproto_test.Capnp.Test public class Result_hold : ICapnpSerializable { + public const UInt64 TypeId = 0xf839fb1374d003c9UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12649,6 +12757,7 @@ namespace Capnproto_test.Capnp.Test public class Params_callHeld : ICapnpSerializable { + public const UInt64 TypeId = 0xf8c5e5ef1edf83beUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12692,6 +12801,7 @@ namespace Capnproto_test.Capnp.Test public class Result_callHeld : ICapnpSerializable { + public const UInt64 TypeId = 0xe59935f160ac7578UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12750,6 +12860,7 @@ namespace Capnproto_test.Capnp.Test public class Params_getHeld : ICapnpSerializable { + public const UInt64 TypeId = 0xfeffc025fce317e3UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12793,6 +12904,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getHeld : ICapnpSerializable { + public const UInt64 TypeId = 0xef4e146185af67ceUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12851,6 +12963,7 @@ namespace Capnproto_test.Capnp.Test public class Params_echo : ICapnpSerializable { + public const UInt64 TypeId = 0xc07526f7e2e533b9UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12909,6 +13022,7 @@ namespace Capnproto_test.Capnp.Test public class Result_echo : ICapnpSerializable { + public const UInt64 TypeId = 0xa6224536593d5b92UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -12967,6 +13081,7 @@ namespace Capnproto_test.Capnp.Test public class Params_expectCancel : ICapnpSerializable { + public const UInt64 TypeId = 0xa1cc32d87f3edeb1UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13025,6 +13140,7 @@ namespace Capnproto_test.Capnp.Test public class Result_expectCancel : ICapnpSerializable { + public const UInt64 TypeId = 0x8a3eba1758c0916eUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13068,6 +13184,7 @@ namespace Capnproto_test.Capnp.Test public class Params_methodWithDefaults : ICapnpSerializable { + public const UInt64 TypeId = 0x99160a25fa50fbf1UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13158,6 +13275,7 @@ namespace Capnproto_test.Capnp.Test public class Result_methodWithDefaults : ICapnpSerializable { + public const UInt64 TypeId = 0x9c7e066f845a6c56UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13232,6 +13350,7 @@ namespace Capnproto_test.Capnp.Test public class Params_getHandle : ICapnpSerializable { + public const UInt64 TypeId = 0xead024a301a092a1UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13275,6 +13394,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getHandle : ICapnpSerializable { + public const UInt64 TypeId = 0xc3490d75420a1fe8UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13333,6 +13453,7 @@ namespace Capnproto_test.Capnp.Test public class Params_getNull : ICapnpSerializable { + public const UInt64 TypeId = 0xd8493f0e175d61f2UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13376,6 +13497,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getNull : ICapnpSerializable { + public const UInt64 TypeId = 0xe6955d8ef1023671UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13434,6 +13556,7 @@ namespace Capnproto_test.Capnp.Test public class Params_getEnormousString : ICapnpSerializable { + public const UInt64 TypeId = 0x805df436f55dd07aUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13477,6 +13600,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getEnormousString : ICapnpSerializable { + public const UInt64 TypeId = 0x860e7512dc3925b0UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13535,6 +13659,7 @@ namespace Capnproto_test.Capnp.Test public class Params_methodWithNullDefault : ICapnpSerializable { + public const UInt64 TypeId = 0xfb92899aeb0ee74fUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13608,6 +13733,7 @@ namespace Capnproto_test.Capnp.Test public class Result_methodWithNullDefault : ICapnpSerializable { + public const UInt64 TypeId = 0x8467348247305cf7UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13875,6 +14001,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_passThrough : ICapnpSerializable { + public const UInt64 TypeId = 0xff9bdcd05085d786UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13918,6 +14045,7 @@ namespace Capnproto_test.Capnp.Test public class Params_intercept : ICapnpSerializable { + public const UInt64 TypeId = 0xee94bed3615ee745UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -13962,6 +14090,7 @@ namespace Capnproto_test.Capnp.Test public class Result : ICapnpSerializable { + public const UInt64 TypeId = 0xb0c6163faf291965UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14020,6 +14149,7 @@ namespace Capnproto_test.Capnp.Test public class Params_makeThing : ICapnpSerializable { + public const UInt64 TypeId = 0xd8ac2acc3ece6556UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14063,6 +14193,7 @@ namespace Capnproto_test.Capnp.Test public class Result_makeThing : ICapnpSerializable { + public const UInt64 TypeId = 0xe5d4904814ccbf29UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14121,6 +14252,7 @@ namespace Capnproto_test.Capnp.Test public class Params_callPassThrough : ICapnpSerializable { + public const UInt64 TypeId = 0x945d9f634a6a29daUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14194,6 +14326,7 @@ namespace Capnproto_test.Capnp.Test public class Params_callIntercept : ICapnpSerializable { + public const UInt64 TypeId = 0x8749aac3375c5c71UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14267,6 +14400,7 @@ namespace Capnproto_test.Capnp.Test public class Params_loopback : ICapnpSerializable { + public const UInt64 TypeId = 0x869a1b7ab34b42c9UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14325,6 +14459,7 @@ namespace Capnproto_test.Capnp.Test public class Result_loopback : ICapnpSerializable { + public const UInt64 TypeId = 0xecd19398fd88ab5cUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14383,6 +14518,7 @@ namespace Capnproto_test.Capnp.Test public class Params_waitForever : ICapnpSerializable { + public const UInt64 TypeId = 0x8f6bb30cc62917ffUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14426,6 +14562,7 @@ namespace Capnproto_test.Capnp.Test public class Result_waitForever : ICapnpSerializable { + public const UInt64 TypeId = 0xc343a4907280be01UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14470,6 +14607,7 @@ namespace Capnproto_test.Capnp.Test public class TestContainMembrane : ICapnpSerializable { + public const UInt64 TypeId = 0x949449ad7c11fa5cUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14543,6 +14681,7 @@ namespace Capnproto_test.Capnp.Test public class TestTransferCap : ICapnpSerializable { + public const UInt64 TypeId = 0xdd2b66a791a279f0UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14600,6 +14739,7 @@ namespace Capnproto_test.Capnp.Test public class Element : ICapnpSerializable { + public const UInt64 TypeId = 0xc7263e8f88844abcUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14769,6 +14909,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_delete : ICapnpSerializable { + public const UInt64 TypeId = 0xca3a89cdeb6bd6b7UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14812,6 +14953,7 @@ namespace Capnproto_test.Capnp.Test public class Result_delete : ICapnpSerializable { + public const UInt64 TypeId = 0xeeb5843598307592UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14855,6 +14997,7 @@ namespace Capnproto_test.Capnp.Test public class Params_class : ICapnpSerializable { + public const UInt64 TypeId = 0x9cf5a8313c5db036UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14898,6 +15041,7 @@ namespace Capnproto_test.Capnp.Test public class Result_class : ICapnpSerializable { + public const UInt64 TypeId = 0xc0253868ac12e7d8UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14941,6 +15085,7 @@ namespace Capnproto_test.Capnp.Test public class Params_void : ICapnpSerializable { + public const UInt64 TypeId = 0xa4a08763833c7757UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -14984,6 +15129,7 @@ namespace Capnproto_test.Capnp.Test public class Result_void : ICapnpSerializable { + public const UInt64 TypeId = 0xde82773089c0aeabUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15027,6 +15173,7 @@ namespace Capnproto_test.Capnp.Test public class Params_return : ICapnpSerializable { + public const UInt64 TypeId = 0x99817360625e8ca3UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15070,6 +15217,7 @@ namespace Capnproto_test.Capnp.Test public class Result_return : ICapnpSerializable { + public const UInt64 TypeId = 0xb70872e07eaa992fUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15163,6 +15311,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_getCallerId : ICapnpSerializable { + public const UInt64 TypeId = 0x8ec30e2451f1cffeUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15206,6 +15355,7 @@ namespace Capnproto_test.Capnp.Test public class Result_getCallerId : ICapnpSerializable { + public const UInt64 TypeId = 0xc71cf776034a3e67UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15265,6 +15415,7 @@ namespace Capnproto_test.Capnp.Test public class TestSturdyRef : ICapnpSerializable { + public const UInt64 TypeId = 0xceba982cb629f6c2UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15338,6 +15489,7 @@ namespace Capnproto_test.Capnp.Test public class TestSturdyRefHostId : ICapnpSerializable { + public const UInt64 TypeId = 0xe02d3bbe1010e342UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15396,6 +15548,7 @@ namespace Capnproto_test.Capnp.Test public class TestSturdyRefObjectId : ICapnpSerializable { + public const UInt64 TypeId = 0xaeb2ad168e2f5697UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15464,6 +15617,7 @@ namespace Capnproto_test.Capnp.Test public class TestProvisionId : ICapnpSerializable { + public const UInt64 TypeId = 0x9e5c574772b1d462UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15507,6 +15661,7 @@ namespace Capnproto_test.Capnp.Test public class TestRecipientId : ICapnpSerializable { + public const UInt64 TypeId = 0xea2fb7dca9cdbdeaUL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15550,6 +15705,7 @@ namespace Capnproto_test.Capnp.Test public class TestThirdPartyCapId : ICapnpSerializable { + public const UInt64 TypeId = 0xa805157b98b65469UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15593,6 +15749,7 @@ namespace Capnproto_test.Capnp.Test public class TestJoinResult : ICapnpSerializable { + public const UInt64 TypeId = 0xf4c58a8ebcd0f600UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15636,6 +15793,7 @@ namespace Capnproto_test.Capnp.Test public class TestNameAnnotation : ICapnpSerializable { + public const UInt64 TypeId = 0xd1fd8e9caf2a5d58UL; public enum WHICH : ushort { BadFieldName = 0, @@ -15798,6 +15956,7 @@ namespace Capnproto_test.Capnp.Test public class @badlyNamedUnion : ICapnpSerializable { + public const UInt64 TypeId = 0x89d9d1626b34017cUL; public enum WHICH : ushort { BadlyNamedGroup = 0, @@ -15928,6 +16087,7 @@ namespace Capnproto_test.Capnp.Test public class @badlyNamedGroup : ICapnpSerializable { + public const UInt64 TypeId = 0xc3594bce5b24b722UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -15978,6 +16138,7 @@ namespace Capnproto_test.Capnp.Test public class NestedStruct : ICapnpSerializable { + public const UInt64 TypeId = 0xbe406b6341d52284UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -16098,6 +16259,7 @@ namespace Capnproto_test.Capnp.Test { public class Params_badlyNamedMethod : ICapnpSerializable { + public const UInt64 TypeId = 0xc12efc3b075adfe9UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); @@ -16156,6 +16318,7 @@ namespace Capnproto_test.Capnp.Test public class Result_badlyNamedMethod : ICapnpSerializable { + public const UInt64 TypeId = 0xdcc3cdb4b28f6c86UL; void ICapnpSerializable.Deserialize(DeserializerState arg_) { var reader = READER.create(arg_); diff --git a/capnpc-csharp/Generator/CodeGenerator.cs b/capnpc-csharp/Generator/CodeGenerator.cs index e401b3a..c9d608f 100644 --- a/capnpc-csharp/Generator/CodeGenerator.cs +++ b/capnpc-csharp/Generator/CodeGenerator.cs @@ -71,6 +71,8 @@ .AddConstraintClauses(MakeTypeParameterConstraints(def).ToArray()); } + topDecl = topDecl.AddMembers(CommonSnippetGen.MakeTypeIdConst(def.Id, _names)); + if (def.UnionInfo != null) { topDecl = topDecl.AddMembers(_commonGen.MakeUnionSelectorEnum(def)); From 95a7a8652af19f25b857aaf5eb9c443fc14d88e8 Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 13:23:02 -0400 Subject: [PATCH 4/7] Implement TypeId attribute. --- Capnp.Net.Runtime/TypeIdAttribute.cs | 27 +++++++++++++++++++++ capnpc-csharp/Generator/CommonSnippetGen.cs | 14 +++++++++++ 2 files changed, 41 insertions(+) create mode 100644 Capnp.Net.Runtime/TypeIdAttribute.cs diff --git a/Capnp.Net.Runtime/TypeIdAttribute.cs b/Capnp.Net.Runtime/TypeIdAttribute.cs new file mode 100644 index 0000000..098dd03 --- /dev/null +++ b/Capnp.Net.Runtime/TypeIdAttribute.cs @@ -0,0 +1,27 @@ +using System; + +namespace Capnp +{ + /// + /// Annotates an enum, class or interface with its schema type identifier. + /// + [AttributeUsage(AttributeTargets.Enum | AttributeTargets.Class |AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] + public class TypeIdAttribute : Attribute + { + /// + /// Constructs this attribute. + /// + /// The 64-bit type identifier from the schema file. + /// is zero. + public TypeIdAttribute(ulong typeId) + { + if (typeId == 0) throw new ArgumentOutOfRangeException(nameof(typeId), "The value cannot be zero."); + Id = typeId; + } + + /// + /// The schema type identifier. + /// + public ulong Id { get; } + } +} diff --git a/capnpc-csharp/Generator/CommonSnippetGen.cs b/capnpc-csharp/Generator/CommonSnippetGen.cs index 56d974e..40a4fa9 100644 --- a/capnpc-csharp/Generator/CommonSnippetGen.cs +++ b/capnpc-csharp/Generator/CommonSnippetGen.cs @@ -108,5 +108,19 @@ namespace CapnpC.Generator new[]{ Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.ConstKeyword)})); + + public static AttributeSyntax MakeTypeIdAttribute(ulong id) => + Attribute( + IdentifierName("TypeId")) + .WithArgumentList( + AttributeArgumentList( + SingletonSeparatedList( + AttributeArgument(HexLiteral(id))))); + + public static SyntaxList MakeTypeIdAttributeLists(ulong id) => + SingletonList( + AttributeList( + SingletonSeparatedList( + CommonSnippetGen.MakeTypeIdAttribute(id)))); } } From d4d8152963e703b3819133685de4fb5a62c90c2f Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 13:38:38 -0400 Subject: [PATCH 5/7] Add TypeId attribute to structs. --- .../Embedded Resources/test.cs | 163 ++++++++++++++++++ capnpc-csharp/Generator/CodeGenerator.cs | 1 + 2 files changed, 164 insertions(+) diff --git a/capnpc-csharp.tests/Embedded Resources/test.cs b/capnpc-csharp.tests/Embedded Resources/test.cs index ce514b6..886357d 100644 --- a/capnpc-csharp.tests/Embedded Resources/test.cs +++ b/capnpc-csharp.tests/Embedded Resources/test.cs @@ -19,6 +19,7 @@ namespace Capnproto_test.Capnp.Test garply } + [TypeId(0xa0a8f314b80b63fdUL)] public class TestAllTypes : ICapnpSerializable { public const UInt64 TypeId = 0xa0a8f314b80b63fdUL; @@ -543,6 +544,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xeb3f9ebe98c73cb6UL)] public class TestDefaults : ICapnpSerializable { public const UInt64 TypeId = 0xeb3f9ebe98c73cb6UL; @@ -1114,6 +1116,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe3da5a2ccd28c0d8UL)] public class TestAnyPointer : ICapnpSerializable { public const UInt64 TypeId = 0xe3da5a2ccd28c0d8UL; @@ -1173,6 +1176,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf49850f63c2bfa59UL)] public class TestAnyOthers : ICapnpSerializable { public const UInt64 TypeId = 0xf49850f63c2bfa59UL; @@ -1262,6 +1266,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa9d5f8efe770022bUL)] public class TestOutOfOrder : ICapnpSerializable { public const UInt64 TypeId = 0xa9d5f8efe770022bUL; @@ -1441,6 +1446,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf47697362233ce52UL)] public class TestUnion : ICapnpSerializable { public const UInt64 TypeId = 0xf47697362233ce52UL; @@ -1660,6 +1666,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xfc76a82eecb7a718UL)] public class @union0 : ICapnpSerializable { public const UInt64 TypeId = 0xfc76a82eecb7a718UL; @@ -2079,6 +2086,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xee0a6b99b7dc7ab2UL)] public class @union1 : ICapnpSerializable { public const UInt64 TypeId = 0xee0a6b99b7dc7ab2UL; @@ -2660,6 +2668,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xafc5fd419f0d66d4UL)] public class @union2 : ICapnpSerializable { public const UInt64 TypeId = 0xafc5fd419f0d66d4UL; @@ -2874,6 +2883,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa2fb022ec7f30053UL)] public class @union3 : ICapnpSerializable { public const UInt64 TypeId = 0xa2fb022ec7f30053UL; @@ -3089,6 +3099,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9e2e784c915329b6UL)] public class TestUnnamedUnion : ICapnpSerializable { public const UInt64 TypeId = 0x9e2e784c915329b6UL; @@ -3269,6 +3280,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x89a9494f1b900f22UL)] public class TestUnionInUnion : ICapnpSerializable { public const UInt64 TypeId = 0x89a9494f1b900f22UL; @@ -3326,6 +3338,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xd005f6c63707670cUL)] public class @outer : ICapnpSerializable { public const UInt64 TypeId = 0xd005f6c63707670cUL; @@ -3457,6 +3470,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xff9ce111c6f8e5dbUL)] public class @inner : ICapnpSerializable { public const UInt64 TypeId = 0xff9ce111c6f8e5dbUL; @@ -3592,6 +3606,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xdc841556134c3103UL)] public class TestGroups : ICapnpSerializable { public const UInt64 TypeId = 0xdc841556134c3103UL; @@ -3649,6 +3664,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe22ae74ff9113268UL)] public class @groups : ICapnpSerializable { public const UInt64 TypeId = 0xe22ae74ff9113268UL; @@ -3805,6 +3821,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf5fcba89c0c1196fUL)] public class @foo : ICapnpSerializable { public const UInt64 TypeId = 0xf5fcba89c0c1196fUL; @@ -3893,6 +3910,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf0fa30304066a4b3UL)] public class @baz : ICapnpSerializable { public const UInt64 TypeId = 0xf0fa30304066a4b3UL; @@ -3981,6 +3999,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb727c0d0091a001dUL)] public class @bar : ICapnpSerializable { public const UInt64 TypeId = 0xb727c0d0091a001dUL; @@ -4071,6 +4090,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf77ed6f7454eec40UL)] public class TestInterleavedGroups : ICapnpSerializable { public const UInt64 TypeId = 0xf77ed6f7454eec40UL; @@ -4142,6 +4162,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc7485a3516c7d3c8UL)] public class @group1 : ICapnpSerializable { public const UInt64 TypeId = 0xc7485a3516c7d3c8UL; @@ -4346,6 +4367,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xdb0afd413f4a313aUL)] public class @corge : ICapnpSerializable { public const UInt64 TypeId = 0xdb0afd413f4a313aUL; @@ -4450,6 +4472,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xcc85a335569990e9UL)] public class @group2 : ICapnpSerializable { public const UInt64 TypeId = 0xcc85a335569990e9UL; @@ -4654,6 +4677,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa017f0366827ee37UL)] public class @corge : ICapnpSerializable { public const UInt64 TypeId = 0xa017f0366827ee37UL; @@ -4759,6 +4783,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x94f7e0b103b4b718UL)] public class TestUnionDefaults : ICapnpSerializable { public const UInt64 TypeId = 0x94f7e0b103b4b718UL; @@ -4879,6 +4904,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xd9f2b5941a343bcdUL)] public class TestNestedTypes : ICapnpSerializable { public const UInt64 TypeId = 0xd9f2b5941a343bcdUL; @@ -4975,6 +5001,7 @@ namespace Capnproto_test.Capnp.Test bar } + [TypeId(0x82cd03a53b29d76bUL)] public class NestedStruct : ICapnpSerializable { public const UInt64 TypeId = 0x82cd03a53b29d76bUL; @@ -5059,6 +5086,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe78aac389e77b065UL)] public class TestUsing : ICapnpSerializable { public const UInt64 TypeId = 0xe78aac389e77b065UL; @@ -5135,6 +5163,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe41885c94393277eUL)] public class TestLists : ICapnpSerializable { public const UInt64 TypeId = 0xe41885c94393277eUL; @@ -5328,6 +5357,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8412c03b75b2cfeeUL)] public class Struct0 : ICapnpSerializable { public const UInt64 TypeId = 0x8412c03b75b2cfeeUL; @@ -5372,6 +5402,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe0fe5870b141ad69UL)] public class Struct1 : ICapnpSerializable { public const UInt64 TypeId = 0xe0fe5870b141ad69UL; @@ -5431,6 +5462,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa6411a353090145bUL)] public class Struct8 : ICapnpSerializable { public const UInt64 TypeId = 0xa6411a353090145bUL; @@ -5490,6 +5522,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa8abf7a82928986cUL)] public class Struct16 : ICapnpSerializable { public const UInt64 TypeId = 0xa8abf7a82928986cUL; @@ -5549,6 +5582,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xad7beedc4ed30742UL)] public class Struct32 : ICapnpSerializable { public const UInt64 TypeId = 0xad7beedc4ed30742UL; @@ -5608,6 +5642,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xef9a34f2ff7cc646UL)] public class Struct64 : ICapnpSerializable { public const UInt64 TypeId = 0xef9a34f2ff7cc646UL; @@ -5667,6 +5702,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc6abf1b0329e6227UL)] public class StructP : ICapnpSerializable { public const UInt64 TypeId = 0xc6abf1b0329e6227UL; @@ -5726,6 +5762,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x943a234ca336b16aUL)] public class Struct0c : ICapnpSerializable { public const UInt64 TypeId = 0x943a234ca336b16aUL; @@ -5785,6 +5822,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8991bc0e74a594cdUL)] public class Struct1c : ICapnpSerializable { public const UInt64 TypeId = 0x8991bc0e74a594cdUL; @@ -5859,6 +5897,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xed267416528c7a24UL)] public class Struct8c : ICapnpSerializable { public const UInt64 TypeId = 0xed267416528c7a24UL; @@ -5933,6 +5972,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9978837b037d58e6UL)] public class Struct16c : ICapnpSerializable { public const UInt64 TypeId = 0x9978837b037d58e6UL; @@ -6007,6 +6047,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xed5fa940f54a7904UL)] public class Struct32c : ICapnpSerializable { public const UInt64 TypeId = 0xed5fa940f54a7904UL; @@ -6081,6 +6122,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xbc743778f2597c7dUL)] public class Struct64c : ICapnpSerializable { public const UInt64 TypeId = 0xbc743778f2597c7dUL; @@ -6155,6 +6197,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc2e364a40182013dUL)] public class StructPc : ICapnpSerializable { public const UInt64 TypeId = 0xc2e364a40182013dUL; @@ -6230,6 +6273,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x92fc29a80f3ddd5cUL)] public class TestFieldZeroIsBit : ICapnpSerializable { public const UInt64 TypeId = 0x92fc29a80f3ddd5cUL; @@ -6321,6 +6365,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa851ad32cbc2ffeaUL)] public class TestListDefaults : ICapnpSerializable { public const UInt64 TypeId = 0xa851ad32cbc2ffeaUL; @@ -6404,6 +6449,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa76e3c9bb7fd56d3UL)] public class TestLateUnion : ICapnpSerializable { public const UInt64 TypeId = 0xa76e3c9bb7fd56d3UL; @@ -6520,6 +6566,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x807280a2901aa079UL)] public class @theUnion : ICapnpSerializable { public const UInt64 TypeId = 0x807280a2901aa079UL; @@ -6680,6 +6727,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc1973984dee98e3aUL)] public class @anotherUnion : ICapnpSerializable { public const UInt64 TypeId = 0xc1973984dee98e3aUL; @@ -6841,6 +6889,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x95b30dd14e01dda8UL)] public class TestOldVersion : ICapnpSerializable { public const UInt64 TypeId = 0x95b30dd14e01dda8UL; @@ -6930,6 +6979,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8ed75a7469f04ce3UL)] public class TestNewVersion : ICapnpSerializable { public const UInt64 TypeId = 0x8ed75a7469f04ce3UL; @@ -7051,6 +7101,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xbd5fe16e5170c492UL)] public class TestOldUnionVersion : ICapnpSerializable { public const UInt64 TypeId = 0xbd5fe16e5170c492UL; @@ -7166,6 +7217,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc7e4c513a975492bUL)] public class TestNewUnionVersion : ICapnpSerializable { public const UInt64 TypeId = 0xc7e4c513a975492bUL; @@ -7298,6 +7350,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x86232c1de4513e84UL)] public class @a : ICapnpSerializable { public const UInt64 TypeId = 0x86232c1de4513e84UL; @@ -7413,6 +7466,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xfaf781ef89a00e39UL)] public class TestStructUnion : ICapnpSerializable { public const UInt64 TypeId = 0xfaf781ef89a00e39UL; @@ -7470,6 +7524,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x992edc677bef5a3cUL)] public class @un : ICapnpSerializable { public const UInt64 TypeId = 0x992edc677bef5a3cUL; @@ -7603,6 +7658,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9daec9823f171085UL)] public class SomeStruct : ICapnpSerializable { public const UInt64 TypeId = 0x9daec9823f171085UL; @@ -7678,6 +7734,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xdec497819d097c3cUL)] public class TestPrintInlineStructs : ICapnpSerializable { public const UInt64 TypeId = 0xdec497819d097c3cUL; @@ -7751,6 +7808,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8e4936003708dac2UL)] public class InlineStruct : ICapnpSerializable { public const UInt64 TypeId = 0x8e4936003708dac2UL; @@ -7826,6 +7884,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x91afd4a864dbb030UL)] public class TestWholeFloatDefault : ICapnpSerializable { public const UInt64 TypeId = 0x91afd4a864dbb030UL; @@ -7902,6 +7961,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9d5b8cd8de9922ebUL)] public class TestGenerics : ICapnpSerializable where TFoo : class where TBar : class { public const UInt64 TypeId = 0x9d5b8cd8de9922ebUL; @@ -8061,6 +8121,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb46a779beaf3384eUL)] public class @ug : ICapnpSerializable { public const UInt64 TypeId = 0xb46a779beaf3384eUL; @@ -8119,6 +8180,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf6a841117e19ac73UL)] public class Inner : ICapnpSerializable { public const UInt64 TypeId = 0xf6a841117e19ac73UL; @@ -8193,6 +8255,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa9ab42b118d6d435UL)] public class Inner2 : ICapnpSerializable where TBaz : class { public const UInt64 TypeId = 0xa9ab42b118d6d435UL; @@ -8296,6 +8359,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb6a0829c762b06f3UL)] public class DeepNest : ICapnpSerializable where TQux : class { public const UInt64 TypeId = 0xb6a0829c762b06f3UL; @@ -8438,6 +8502,7 @@ namespace Capnproto_test.Capnp.Test public static class DeepNestInterface where TQuux : class { + [TypeId(0xb84eecc799437049UL)] public class Params_call : ICapnpSerializable { public const UInt64 TypeId = 0xb84eecc799437049UL; @@ -8482,6 +8547,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe080f0fc54614f6fUL)] public class Result_call : ICapnpSerializable { public const UInt64 TypeId = 0xe080f0fc54614f6fUL; @@ -8576,6 +8642,7 @@ namespace Capnproto_test.Capnp.Test public static class Interface where TQux : class { + [TypeId(0xa5b46224e33581adUL)] public class Result_call : ICapnpSerializable { public const UInt64 TypeId = 0xa5b46224e33581adUL; @@ -8651,6 +8718,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8e656edfb45ba6cfUL)] public class UseAliases : ICapnpSerializable { public const UInt64 TypeId = 0x8e656edfb45ba6cfUL; @@ -8786,6 +8854,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa9b2b1f52dde845dUL)] public class TestGenericsWrapper : ICapnpSerializable where TFoo : class where TBar : class { public const UInt64 TypeId = 0xa9b2b1f52dde845dUL; @@ -8845,6 +8914,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf28f83667a557a04UL)] public class TestGenericsWrapper2 : ICapnpSerializable { public const UInt64 TypeId = 0xf28f83667a557a04UL; @@ -8955,6 +9025,7 @@ namespace Capnproto_test.Capnp.Test public static class TestImplicitMethodParams { + [TypeId(0xf83f8caf54bdc486UL)] public class Params_call : ICapnpSerializable where TT : class where TU : class { public const UInt64 TypeId = 0xf83f8caf54bdc486UL; @@ -9082,6 +9153,7 @@ namespace Capnproto_test.Capnp.Test public static class TestImplicitMethodParamsInGeneric where TV : class { + [TypeId(0x9aab8e25c808d71eUL)] public class Params_call : ICapnpSerializable where TT : class where TU : class { public const UInt64 TypeId = 0x9aab8e25c808d71eUL; @@ -9157,6 +9229,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa54870440e919063UL)] public class TestGenericsUnion : ICapnpSerializable where TFoo : class where TBar : class { public const UInt64 TypeId = 0xa54870440e919063UL; @@ -9291,6 +9364,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9427b2a71030338fUL)] public class TestUseGenerics : ICapnpSerializable { public const UInt64 TypeId = 0x9427b2a71030338fUL; @@ -9741,6 +9815,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc5598844441096dcUL)] public class TestEmptyStruct : ICapnpSerializable { public const UInt64 TypeId = 0xc5598844441096dcUL; @@ -9785,6 +9860,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xabed745cd8c92095UL)] public class TestConstants : ICapnpSerializable { public const UInt64 TypeId = 0xabed745cd8c92095UL; @@ -9829,6 +9905,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xddc280dbee9c99b3UL)] public class TestAnyPointerConstants : ICapnpSerializable { public const UInt64 TypeId = 0xddc280dbee9c99b3UL; @@ -10017,6 +10094,7 @@ namespace Capnproto_test.Capnp.Test public static class TestInterface { + [TypeId(0xb874edc0d559b391UL)] public class Params_foo : ICapnpSerializable { public const UInt64 TypeId = 0xb874edc0d559b391UL; @@ -10091,6 +10169,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb04fcaddab714ba4UL)] public class Result_foo : ICapnpSerializable { public const UInt64 TypeId = 0xb04fcaddab714ba4UL; @@ -10150,6 +10229,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xd044893357b42568UL)] public class Params_bar : ICapnpSerializable { public const UInt64 TypeId = 0xd044893357b42568UL; @@ -10194,6 +10274,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9bf141df4247d52fUL)] public class Result_bar : ICapnpSerializable { public const UInt64 TypeId = 0x9bf141df4247d52fUL; @@ -10238,6 +10319,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xd9ac8abb2a91cfbcUL)] public class Params_baz : ICapnpSerializable { public const UInt64 TypeId = 0xd9ac8abb2a91cfbcUL; @@ -10297,6 +10379,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9b99d14f2f375b2dUL)] public class Result_baz : ICapnpSerializable { public const UInt64 TypeId = 0x9b99d14f2f375b2dUL; @@ -10454,6 +10537,7 @@ namespace Capnproto_test.Capnp.Test public static class TestExtends { + [TypeId(0x83a4bc5471363f17UL)] public class Params_qux : ICapnpSerializable { public const UInt64 TypeId = 0x83a4bc5471363f17UL; @@ -10498,6 +10582,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8e4b3d1a3e2753ddUL)] public class Result_qux : ICapnpSerializable { public const UInt64 TypeId = 0x8e4b3d1a3e2753ddUL; @@ -10542,6 +10627,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xacf67532a7e7bad9UL)] public class Result_corge : ICapnpSerializable { public const UInt64 TypeId = 0xacf67532a7e7bad9UL; @@ -10586,6 +10672,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf3b834e851ea8af6UL)] public class Params_grault : ICapnpSerializable { public const UInt64 TypeId = 0xf3b834e851ea8af6UL; @@ -10827,6 +10914,7 @@ namespace Capnproto_test.Capnp.Test public static class TestPipeline { + [TypeId(0xb0b29e51db0e26b1UL)] public class Box : ICapnpSerializable { public const UInt64 TypeId = 0xb0b29e51db0e26b1UL; @@ -10886,6 +10974,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9442ad5a1d2c8acbUL)] public class AnyBox : ICapnpSerializable { public const UInt64 TypeId = 0x9442ad5a1d2c8acbUL; @@ -10945,6 +11034,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc7e8df5096257034UL)] public class Params_getCap : ICapnpSerializable { public const UInt64 TypeId = 0xc7e8df5096257034UL; @@ -11019,6 +11109,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb2442a9e0ba28fdfUL)] public class Result_getCap : ICapnpSerializable { public const UInt64 TypeId = 0xb2442a9e0ba28fdfUL; @@ -11093,6 +11184,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa604ee63cf37819fUL)] public class Params_testPointers : ICapnpSerializable { public const UInt64 TypeId = 0xa604ee63cf37819fUL; @@ -11182,6 +11274,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8eda54756c6070d6UL)] public class Result_testPointers : ICapnpSerializable { public const UInt64 TypeId = 0x8eda54756c6070d6UL; @@ -11226,6 +11319,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf8e36b53ab093d4eUL)] public class Params_getAnyCap : ICapnpSerializable { public const UInt64 TypeId = 0xf8e36b53ab093d4eUL; @@ -11300,6 +11394,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xbf44b4c94c26ef79UL)] public class Result_getAnyCap : ICapnpSerializable { public const UInt64 TypeId = 0xbf44b4c94c26ef79UL; @@ -11420,6 +11515,7 @@ namespace Capnproto_test.Capnp.Test public static class TestCallOrder { + [TypeId(0x8f1e8cd56ceb74dcUL)] public class Params_getCallSequence : ICapnpSerializable { public const UInt64 TypeId = 0x8f1e8cd56ceb74dcUL; @@ -11479,6 +11575,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xdedbb6bf3810eab7UL)] public class Result_getCallSequence : ICapnpSerializable { public const UInt64 TypeId = 0xdedbb6bf3810eab7UL; @@ -11596,6 +11693,7 @@ namespace Capnproto_test.Capnp.Test public static class TestTailCallee { + [TypeId(0xa9ed2e5a9fd53d19UL)] public class TailResult : ICapnpSerializable { public const UInt64 TypeId = 0xa9ed2e5a9fd53d19UL; @@ -11685,6 +11783,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc5e1efc325614957UL)] public class Params_foo : ICapnpSerializable { public const UInt64 TypeId = 0xc5e1efc325614957UL; @@ -11812,6 +11911,7 @@ namespace Capnproto_test.Capnp.Test public static class TestTailCaller { + [TypeId(0xb07a279515dc8ac5UL)] public class Params_foo : ICapnpSerializable { public const UInt64 TypeId = 0xb07a279515dc8ac5UL; @@ -12298,6 +12398,7 @@ namespace Capnproto_test.Capnp.Test public static class TestMoreStuff { + [TypeId(0x931ba418da60f6e4UL)] public class Params_callFoo : ICapnpSerializable { public const UInt64 TypeId = 0x931ba418da60f6e4UL; @@ -12357,6 +12458,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9a28970beccecdd0UL)] public class Result_callFoo : ICapnpSerializable { public const UInt64 TypeId = 0x9a28970beccecdd0UL; @@ -12416,6 +12518,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xfabc700c2ebe6378UL)] public class Params_callFooWhenResolved : ICapnpSerializable { public const UInt64 TypeId = 0xfabc700c2ebe6378UL; @@ -12475,6 +12578,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa54ce1e9aa822f90UL)] public class Result_callFooWhenResolved : ICapnpSerializable { public const UInt64 TypeId = 0xa54ce1e9aa822f90UL; @@ -12534,6 +12638,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x94fe60465c95182bUL)] public class Params_neverReturn : ICapnpSerializable { public const UInt64 TypeId = 0x94fe60465c95182bUL; @@ -12593,6 +12698,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xdef4e5fa6999c5dcUL)] public class Result_neverReturn : ICapnpSerializable { public const UInt64 TypeId = 0xdef4e5fa6999c5dcUL; @@ -12652,6 +12758,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xfe7c8fbb769d8e58UL)] public class Params_hold : ICapnpSerializable { public const UInt64 TypeId = 0xfe7c8fbb769d8e58UL; @@ -12711,6 +12818,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf839fb1374d003c9UL)] public class Result_hold : ICapnpSerializable { public const UInt64 TypeId = 0xf839fb1374d003c9UL; @@ -12755,6 +12863,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf8c5e5ef1edf83beUL)] public class Params_callHeld : ICapnpSerializable { public const UInt64 TypeId = 0xf8c5e5ef1edf83beUL; @@ -12799,6 +12908,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe59935f160ac7578UL)] public class Result_callHeld : ICapnpSerializable { public const UInt64 TypeId = 0xe59935f160ac7578UL; @@ -12858,6 +12968,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xfeffc025fce317e3UL)] public class Params_getHeld : ICapnpSerializable { public const UInt64 TypeId = 0xfeffc025fce317e3UL; @@ -12902,6 +13013,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xef4e146185af67ceUL)] public class Result_getHeld : ICapnpSerializable { public const UInt64 TypeId = 0xef4e146185af67ceUL; @@ -12961,6 +13073,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc07526f7e2e533b9UL)] public class Params_echo : ICapnpSerializable { public const UInt64 TypeId = 0xc07526f7e2e533b9UL; @@ -13020,6 +13133,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa6224536593d5b92UL)] public class Result_echo : ICapnpSerializable { public const UInt64 TypeId = 0xa6224536593d5b92UL; @@ -13079,6 +13193,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa1cc32d87f3edeb1UL)] public class Params_expectCancel : ICapnpSerializable { public const UInt64 TypeId = 0xa1cc32d87f3edeb1UL; @@ -13138,6 +13253,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8a3eba1758c0916eUL)] public class Result_expectCancel : ICapnpSerializable { public const UInt64 TypeId = 0x8a3eba1758c0916eUL; @@ -13182,6 +13298,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x99160a25fa50fbf1UL)] public class Params_methodWithDefaults : ICapnpSerializable { public const UInt64 TypeId = 0x99160a25fa50fbf1UL; @@ -13273,6 +13390,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9c7e066f845a6c56UL)] public class Result_methodWithDefaults : ICapnpSerializable { public const UInt64 TypeId = 0x9c7e066f845a6c56UL; @@ -13348,6 +13466,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xead024a301a092a1UL)] public class Params_getHandle : ICapnpSerializable { public const UInt64 TypeId = 0xead024a301a092a1UL; @@ -13392,6 +13511,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc3490d75420a1fe8UL)] public class Result_getHandle : ICapnpSerializable { public const UInt64 TypeId = 0xc3490d75420a1fe8UL; @@ -13451,6 +13571,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xd8493f0e175d61f2UL)] public class Params_getNull : ICapnpSerializable { public const UInt64 TypeId = 0xd8493f0e175d61f2UL; @@ -13495,6 +13616,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe6955d8ef1023671UL)] public class Result_getNull : ICapnpSerializable { public const UInt64 TypeId = 0xe6955d8ef1023671UL; @@ -13554,6 +13676,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x805df436f55dd07aUL)] public class Params_getEnormousString : ICapnpSerializable { public const UInt64 TypeId = 0x805df436f55dd07aUL; @@ -13598,6 +13721,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x860e7512dc3925b0UL)] public class Result_getEnormousString : ICapnpSerializable { public const UInt64 TypeId = 0x860e7512dc3925b0UL; @@ -13657,6 +13781,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xfb92899aeb0ee74fUL)] public class Params_methodWithNullDefault : ICapnpSerializable { public const UInt64 TypeId = 0xfb92899aeb0ee74fUL; @@ -13731,6 +13856,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8467348247305cf7UL)] public class Result_methodWithNullDefault : ICapnpSerializable { public const UInt64 TypeId = 0x8467348247305cf7UL; @@ -13999,6 +14125,7 @@ namespace Capnproto_test.Capnp.Test public static class Thing { + [TypeId(0xff9bdcd05085d786UL)] public class Params_passThrough : ICapnpSerializable { public const UInt64 TypeId = 0xff9bdcd05085d786UL; @@ -14043,6 +14170,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xee94bed3615ee745UL)] public class Params_intercept : ICapnpSerializable { public const UInt64 TypeId = 0xee94bed3615ee745UL; @@ -14088,6 +14216,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb0c6163faf291965UL)] public class Result : ICapnpSerializable { public const UInt64 TypeId = 0xb0c6163faf291965UL; @@ -14147,6 +14276,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xd8ac2acc3ece6556UL)] public class Params_makeThing : ICapnpSerializable { public const UInt64 TypeId = 0xd8ac2acc3ece6556UL; @@ -14191,6 +14321,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe5d4904814ccbf29UL)] public class Result_makeThing : ICapnpSerializable { public const UInt64 TypeId = 0xe5d4904814ccbf29UL; @@ -14250,6 +14381,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x945d9f634a6a29daUL)] public class Params_callPassThrough : ICapnpSerializable { public const UInt64 TypeId = 0x945d9f634a6a29daUL; @@ -14324,6 +14456,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8749aac3375c5c71UL)] public class Params_callIntercept : ICapnpSerializable { public const UInt64 TypeId = 0x8749aac3375c5c71UL; @@ -14398,6 +14531,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x869a1b7ab34b42c9UL)] public class Params_loopback : ICapnpSerializable { public const UInt64 TypeId = 0x869a1b7ab34b42c9UL; @@ -14457,6 +14591,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xecd19398fd88ab5cUL)] public class Result_loopback : ICapnpSerializable { public const UInt64 TypeId = 0xecd19398fd88ab5cUL; @@ -14516,6 +14651,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x8f6bb30cc62917ffUL)] public class Params_waitForever : ICapnpSerializable { public const UInt64 TypeId = 0x8f6bb30cc62917ffUL; @@ -14560,6 +14696,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc343a4907280be01UL)] public class Result_waitForever : ICapnpSerializable { public const UInt64 TypeId = 0xc343a4907280be01UL; @@ -14605,6 +14742,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x949449ad7c11fa5cUL)] public class TestContainMembrane : ICapnpSerializable { public const UInt64 TypeId = 0x949449ad7c11fa5cUL; @@ -14679,6 +14817,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xdd2b66a791a279f0UL)] public class TestTransferCap : ICapnpSerializable { public const UInt64 TypeId = 0xdd2b66a791a279f0UL; @@ -14737,6 +14876,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc7263e8f88844abcUL)] public class Element : ICapnpSerializable { public const UInt64 TypeId = 0xc7263e8f88844abcUL; @@ -14907,6 +15047,7 @@ namespace Capnproto_test.Capnp.Test public static class TestKeywordMethods { + [TypeId(0xca3a89cdeb6bd6b7UL)] public class Params_delete : ICapnpSerializable { public const UInt64 TypeId = 0xca3a89cdeb6bd6b7UL; @@ -14951,6 +15092,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xeeb5843598307592UL)] public class Result_delete : ICapnpSerializable { public const UInt64 TypeId = 0xeeb5843598307592UL; @@ -14995,6 +15137,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9cf5a8313c5db036UL)] public class Params_class : ICapnpSerializable { public const UInt64 TypeId = 0x9cf5a8313c5db036UL; @@ -15039,6 +15182,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc0253868ac12e7d8UL)] public class Result_class : ICapnpSerializable { public const UInt64 TypeId = 0xc0253868ac12e7d8UL; @@ -15083,6 +15227,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa4a08763833c7757UL)] public class Params_void : ICapnpSerializable { public const UInt64 TypeId = 0xa4a08763833c7757UL; @@ -15127,6 +15272,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xde82773089c0aeabUL)] public class Result_void : ICapnpSerializable { public const UInt64 TypeId = 0xde82773089c0aeabUL; @@ -15171,6 +15317,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x99817360625e8ca3UL)] public class Params_return : ICapnpSerializable { public const UInt64 TypeId = 0x99817360625e8ca3UL; @@ -15215,6 +15362,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb70872e07eaa992fUL)] public class Result_return : ICapnpSerializable { public const UInt64 TypeId = 0xb70872e07eaa992fUL; @@ -15309,6 +15457,7 @@ namespace Capnproto_test.Capnp.Test public static class TestAuthenticatedBootstrap where TVatId : class { + [TypeId(0x8ec30e2451f1cffeUL)] public class Params_getCallerId : ICapnpSerializable { public const UInt64 TypeId = 0x8ec30e2451f1cffeUL; @@ -15353,6 +15502,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc71cf776034a3e67UL)] public class Result_getCallerId : ICapnpSerializable { public const UInt64 TypeId = 0xc71cf776034a3e67UL; @@ -15413,6 +15563,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xceba982cb629f6c2UL)] public class TestSturdyRef : ICapnpSerializable { public const UInt64 TypeId = 0xceba982cb629f6c2UL; @@ -15487,6 +15638,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xe02d3bbe1010e342UL)] public class TestSturdyRefHostId : ICapnpSerializable { public const UInt64 TypeId = 0xe02d3bbe1010e342UL; @@ -15546,6 +15698,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xaeb2ad168e2f5697UL)] public class TestSturdyRefObjectId : ICapnpSerializable { public const UInt64 TypeId = 0xaeb2ad168e2f5697UL; @@ -15615,6 +15768,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x9e5c574772b1d462UL)] public class TestProvisionId : ICapnpSerializable { public const UInt64 TypeId = 0x9e5c574772b1d462UL; @@ -15659,6 +15813,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xea2fb7dca9cdbdeaUL)] public class TestRecipientId : ICapnpSerializable { public const UInt64 TypeId = 0xea2fb7dca9cdbdeaUL; @@ -15703,6 +15858,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xa805157b98b65469UL)] public class TestThirdPartyCapId : ICapnpSerializable { public const UInt64 TypeId = 0xa805157b98b65469UL; @@ -15747,6 +15903,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf4c58a8ebcd0f600UL)] public class TestJoinResult : ICapnpSerializable { public const UInt64 TypeId = 0xf4c58a8ebcd0f600UL; @@ -15791,6 +15948,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xd1fd8e9caf2a5d58UL)] public class TestNameAnnotation : ICapnpSerializable { public const UInt64 TypeId = 0xd1fd8e9caf2a5d58UL; @@ -15954,6 +16112,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0x89d9d1626b34017cUL)] public class @badlyNamedUnion : ICapnpSerializable { public const UInt64 TypeId = 0x89d9d1626b34017cUL; @@ -16085,6 +16244,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xc3594bce5b24b722UL)] public class @badlyNamedGroup : ICapnpSerializable { public const UInt64 TypeId = 0xc3594bce5b24b722UL; @@ -16136,6 +16296,7 @@ namespace Capnproto_test.Capnp.Test baz } + [TypeId(0xbe406b6341d52284UL)] public class NestedStruct : ICapnpSerializable { public const UInt64 TypeId = 0xbe406b6341d52284UL; @@ -16257,6 +16418,7 @@ namespace Capnproto_test.Capnp.Test public static class TestNameAnnotationInterface { + [TypeId(0xc12efc3b075adfe9UL)] public class Params_badlyNamedMethod : ICapnpSerializable { public const UInt64 TypeId = 0xc12efc3b075adfe9UL; @@ -16316,6 +16478,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xdcc3cdb4b28f6c86UL)] public class Result_badlyNamedMethod : ICapnpSerializable { public const UInt64 TypeId = 0xdcc3cdb4b28f6c86UL; diff --git a/capnpc-csharp/Generator/CodeGenerator.cs b/capnpc-csharp/Generator/CodeGenerator.cs index c9d608f..d5e41c7 100644 --- a/capnpc-csharp/Generator/CodeGenerator.cs +++ b/capnpc-csharp/Generator/CodeGenerator.cs @@ -72,6 +72,7 @@ } topDecl = topDecl.AddMembers(CommonSnippetGen.MakeTypeIdConst(def.Id, _names)); + topDecl = topDecl.WithAttributeLists(CommonSnippetGen.MakeTypeIdAttributeLists(def.Id)); if (def.UnionInfo != null) { From 5c961ef2e72380d2b7860396aa744d96a7d1cbc0 Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 13:49:15 -0400 Subject: [PATCH 6/7] Add TypeId attribute to interfaces. --- .../Embedded Resources/test.cs | 36 +++++++++---------- .../Generator/InterfaceSnippetGen.cs | 1 + 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/capnpc-csharp.tests/Embedded Resources/test.cs b/capnpc-csharp.tests/Embedded Resources/test.cs index 886357d..b22dc97 100644 --- a/capnpc-csharp.tests/Embedded Resources/test.cs +++ b/capnpc-csharp.tests/Embedded Resources/test.cs @@ -8463,7 +8463,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(DeepNestInterfaceProxy<>)), Skeleton(typeof(DeepNestInterfaceSkeleton<>))] + [TypeId(0x8839ed86c9794287UL), Proxy(typeof(DeepNestInterfaceProxy<>)), Skeleton(typeof(DeepNestInterfaceSkeleton<>))] public interface IDeepNestInterface : IDisposable { Task Call(CancellationToken cancellationToken_ = default); @@ -8595,7 +8595,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(InterfaceProxy<>)), Skeleton(typeof(InterfaceSkeleton<>))] + [TypeId(0xc9e749e8dd54da5cUL), Proxy(typeof(InterfaceProxy<>)), Skeleton(typeof(InterfaceSkeleton<>))] public interface IInterface : IDisposable { Task<(TQux, Capnproto_test.Capnp.Test.TestGenerics)> Call(Capnproto_test.Capnp.Test.TestGenerics.Inner2 arg_, CancellationToken cancellationToken_ = default); @@ -8974,7 +8974,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestImplicitMethodParamsProxy)), Skeleton(typeof(TestImplicitMethodParamsSkeleton))] + [TypeId(0x8b9717a3f8d85a9aUL), Proxy(typeof(TestImplicitMethodParamsProxy)), Skeleton(typeof(TestImplicitMethodParamsSkeleton))] public interface ITestImplicitMethodParams : IDisposable { Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) @@ -9101,7 +9101,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestImplicitMethodParamsInGenericProxy<>)), Skeleton(typeof(TestImplicitMethodParamsInGenericSkeleton<>))] + [TypeId(0xdf9ccdeb81a704c9UL), Proxy(typeof(TestImplicitMethodParamsInGenericProxy<>)), Skeleton(typeof(TestImplicitMethodParamsInGenericSkeleton<>))] public interface ITestImplicitMethodParamsInGeneric : IDisposable { Task> Call(TT foo, TU bar, CancellationToken cancellationToken_ = default) @@ -10010,7 +10010,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestInterfaceProxy)), Skeleton(typeof(TestInterfaceSkeleton))] + [TypeId(0x88eb12a0e0af92b2UL), Proxy(typeof(TestInterfaceProxy)), Skeleton(typeof(TestInterfaceSkeleton))] public interface ITestInterface : IDisposable { Task Foo(uint i, bool j, CancellationToken cancellationToken_ = default); @@ -10425,7 +10425,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestExtendsProxy)), Skeleton(typeof(TestExtendsSkeleton))] + [TypeId(0xe4e9bac98670b748UL), Proxy(typeof(TestExtendsProxy)), Skeleton(typeof(TestExtendsSkeleton))] public interface ITestExtends : Capnproto_test.Capnp.Test.ITestInterface { Task Qux(CancellationToken cancellationToken_ = default); @@ -10718,7 +10718,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestExtends2Proxy)), Skeleton(typeof(TestExtends2Skeleton))] + [TypeId(0x98d7e0ef61488783UL), Proxy(typeof(TestExtends2Proxy)), Skeleton(typeof(TestExtends2Skeleton))] public interface ITestExtends2 : Capnproto_test.Capnp.Test.ITestExtends { } @@ -10800,7 +10800,7 @@ namespace Capnproto_test.Capnp.Test public override ulong InterfaceId => 11013518732491786115UL; } - [Proxy(typeof(TestPipelineProxy)), Skeleton(typeof(TestPipelineSkeleton))] + [TypeId(0xa5a404caa61d4cd0UL), Proxy(typeof(TestPipelineProxy)), Skeleton(typeof(TestPipelineSkeleton))] public interface ITestPipeline : IDisposable { Task<(string, Capnproto_test.Capnp.Test.TestPipeline.Box)> GetCap(uint n, Capnproto_test.Capnp.Test.ITestInterface inCap, CancellationToken cancellationToken_ = default); @@ -11470,7 +11470,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestCallOrderProxy)), Skeleton(typeof(TestCallOrderSkeleton))] + [TypeId(0xa0e77035bdff0051UL), Proxy(typeof(TestCallOrderProxy)), Skeleton(typeof(TestCallOrderSkeleton))] public interface ITestCallOrder : IDisposable { Task GetCallSequence(uint expected, CancellationToken cancellationToken_ = default); @@ -11636,7 +11636,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestTailCalleeProxy)), Skeleton(typeof(TestTailCalleeSkeleton))] + [TypeId(0xddd699207eb8e23bUL), Proxy(typeof(TestTailCalleeProxy)), Skeleton(typeof(TestTailCalleeSkeleton))] public interface ITestTailCallee : IDisposable { Task Foo(int i, string t, CancellationToken cancellationToken_ = default); @@ -11859,7 +11859,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestTailCallerProxy)), Skeleton(typeof(TestTailCallerSkeleton))] + [TypeId(0x870bf40110ce3035UL), Proxy(typeof(TestTailCallerProxy)), Skeleton(typeof(TestTailCallerSkeleton))] public interface ITestTailCaller : IDisposable { Task Foo(int i, Capnproto_test.Capnp.Test.ITestTailCallee callee, CancellationToken cancellationToken_ = default); @@ -11987,7 +11987,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestHandleProxy)), Skeleton(typeof(TestHandleSkeleton))] + [TypeId(0xa38e5efe41e53a15UL), Proxy(typeof(TestHandleProxy)), Skeleton(typeof(TestHandleSkeleton))] public interface ITestHandle : IDisposable { } @@ -12006,7 +12006,7 @@ namespace Capnproto_test.Capnp.Test public override ulong InterfaceId => 11785461720995412501UL; } - [Proxy(typeof(TestMoreStuffProxy)), Skeleton(typeof(TestMoreStuffSkeleton))] + [TypeId(0xddc70bf9784133cfUL), Proxy(typeof(TestMoreStuffProxy)), Skeleton(typeof(TestMoreStuffSkeleton))] public interface ITestMoreStuff : Capnproto_test.Capnp.Test.ITestCallOrder { Task CallFoo(Capnproto_test.Capnp.Test.ITestInterface cap, CancellationToken cancellationToken_ = default); @@ -13902,7 +13902,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestMembraneProxy)), Skeleton(typeof(TestMembraneSkeleton))] + [TypeId(0xc07d8dcd80a69c0cUL), Proxy(typeof(TestMembraneProxy)), Skeleton(typeof(TestMembraneSkeleton))] public interface ITestMembrane : IDisposable { Task MakeThing(CancellationToken cancellationToken_ = default); @@ -14058,7 +14058,7 @@ namespace Capnproto_test.Capnp.Test public static class TestMembrane { - [Proxy(typeof(ThingProxy)), Skeleton(typeof(ThingSkeleton))] + [TypeId(0x9352e4e41f173917UL), Proxy(typeof(ThingProxy)), Skeleton(typeof(ThingSkeleton))] public interface IThing : IDisposable { Task PassThrough(CancellationToken cancellationToken_ = default); @@ -14952,7 +14952,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestKeywordMethodsProxy)), Skeleton(typeof(TestKeywordMethodsSkeleton))] + [TypeId(0x9ae342d394247cfcUL), Proxy(typeof(TestKeywordMethodsProxy)), Skeleton(typeof(TestKeywordMethodsSkeleton))] public interface ITestKeywordMethods : IDisposable { Task Delete(CancellationToken cancellationToken_ = default); @@ -15408,7 +15408,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestAuthenticatedBootstrapProxy<>)), Skeleton(typeof(TestAuthenticatedBootstrapSkeleton<>))] + [TypeId(0xea72cc77253798cdUL), Proxy(typeof(TestAuthenticatedBootstrapProxy<>)), Skeleton(typeof(TestAuthenticatedBootstrapSkeleton<>))] public interface ITestAuthenticatedBootstrap : IDisposable { Task GetCallerId(CancellationToken cancellationToken_ = default); @@ -16379,7 +16379,7 @@ namespace Capnproto_test.Capnp.Test } } - [Proxy(typeof(TestNameAnnotationInterfaceProxy)), Skeleton(typeof(TestNameAnnotationInterfaceSkeleton))] + [TypeId(0xd112a69d31ed918bUL), Proxy(typeof(TestNameAnnotationInterfaceProxy)), Skeleton(typeof(TestNameAnnotationInterfaceSkeleton))] public interface ITestNameAnnotationInterface : IDisposable { Task BadlyNamedMethod(byte badlyNamedParam, CancellationToken cancellationToken_ = default); diff --git a/capnpc-csharp/Generator/InterfaceSnippetGen.cs b/capnpc-csharp/Generator/InterfaceSnippetGen.cs index f0adfaa..d6769f5 100644 --- a/capnpc-csharp/Generator/InterfaceSnippetGen.cs +++ b/capnpc-csharp/Generator/InterfaceSnippetGen.cs @@ -97,6 +97,7 @@ namespace CapnpC.Generator .AddAttributeLists( AttributeList() .AddAttributes( + CommonSnippetGen.MakeTypeIdAttribute(type.Id), Attribute(IdentifierName("Proxy")) .AddArgumentListArguments( AttributeArgument( From de6607ed8abce051273699da32d74cca20b6874f Mon Sep 17 00:00:00 2001 From: Kuba Ober Date: Wed, 18 Sep 2019 13:52:34 -0400 Subject: [PATCH 7/7] Add TypeId attribute to enums. --- capnpc-csharp.tests/Embedded Resources/test.cs | 6 ++++++ capnpc-csharp/Generator/CommonSnippetGen.cs | 1 + 2 files changed, 7 insertions(+) diff --git a/capnpc-csharp.tests/Embedded Resources/test.cs b/capnpc-csharp.tests/Embedded Resources/test.cs index b22dc97..5db5225 100644 --- a/capnpc-csharp.tests/Embedded Resources/test.cs +++ b/capnpc-csharp.tests/Embedded Resources/test.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; namespace Capnproto_test.Capnp.Test { + [TypeId(0x9c8e9318b29d9cd3UL)] public enum TestEnum : ushort { foo, @@ -4995,6 +4996,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xb651d2fba42056d4UL)] public enum NestedEnum : ushort { foo, @@ -5077,6 +5079,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xcfa0d546993a3df3UL)] public enum NestedEnum : ushort { baz, @@ -15757,6 +15760,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xef428f2f67c4d439UL)] public enum Tag : ushort { testInterface, @@ -16289,6 +16293,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf610d1deb4c9e84aUL)] public enum BadlyNamedEnum : ushort { foo, @@ -16370,6 +16375,7 @@ namespace Capnproto_test.Capnp.Test } } + [TypeId(0xf6cb3f9c7a4322e0UL)] public enum DeeplyNestedEnum : ushort { quux, diff --git a/capnpc-csharp/Generator/CommonSnippetGen.cs b/capnpc-csharp/Generator/CommonSnippetGen.cs index 40a4fa9..e2058a6 100644 --- a/capnpc-csharp/Generator/CommonSnippetGen.cs +++ b/capnpc-csharp/Generator/CommonSnippetGen.cs @@ -52,6 +52,7 @@ namespace CapnpC.Generator public EnumDeclarationSyntax MakeEnum(TypeDefinition def) { var decl = EnumDeclaration(def.Name) + .WithAttributeLists(MakeTypeIdAttributeLists(def.Id)) .AddModifiers(Public) .AddBaseListTypes(SimpleBaseType(Type()));