mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-13 23:31:50 +01:00
Add TypeId attribute to enums.
This commit is contained in:
parent
5c961ef2e7
commit
de6607ed8a
@ -7,6 +7,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Capnproto_test.Capnp.Test
|
namespace Capnproto_test.Capnp.Test
|
||||||
{
|
{
|
||||||
|
[TypeId(0x9c8e9318b29d9cd3UL)]
|
||||||
public enum TestEnum : ushort
|
public enum TestEnum : ushort
|
||||||
{
|
{
|
||||||
foo,
|
foo,
|
||||||
@ -4995,6 +4996,7 @@ namespace Capnproto_test.Capnp.Test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TypeId(0xb651d2fba42056d4UL)]
|
||||||
public enum NestedEnum : ushort
|
public enum NestedEnum : ushort
|
||||||
{
|
{
|
||||||
foo,
|
foo,
|
||||||
@ -5077,6 +5079,7 @@ namespace Capnproto_test.Capnp.Test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TypeId(0xcfa0d546993a3df3UL)]
|
||||||
public enum NestedEnum : ushort
|
public enum NestedEnum : ushort
|
||||||
{
|
{
|
||||||
baz,
|
baz,
|
||||||
@ -15757,6 +15760,7 @@ namespace Capnproto_test.Capnp.Test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TypeId(0xef428f2f67c4d439UL)]
|
||||||
public enum Tag : ushort
|
public enum Tag : ushort
|
||||||
{
|
{
|
||||||
testInterface,
|
testInterface,
|
||||||
@ -16289,6 +16293,7 @@ namespace Capnproto_test.Capnp.Test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TypeId(0xf610d1deb4c9e84aUL)]
|
||||||
public enum BadlyNamedEnum : ushort
|
public enum BadlyNamedEnum : ushort
|
||||||
{
|
{
|
||||||
foo,
|
foo,
|
||||||
@ -16370,6 +16375,7 @@ namespace Capnproto_test.Capnp.Test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TypeId(0xf6cb3f9c7a4322e0UL)]
|
||||||
public enum DeeplyNestedEnum : ushort
|
public enum DeeplyNestedEnum : ushort
|
||||||
{
|
{
|
||||||
quux,
|
quux,
|
||||||
|
@ -52,6 +52,7 @@ namespace CapnpC.Generator
|
|||||||
public EnumDeclarationSyntax MakeEnum(TypeDefinition def)
|
public EnumDeclarationSyntax MakeEnum(TypeDefinition def)
|
||||||
{
|
{
|
||||||
var decl = EnumDeclaration(def.Name)
|
var decl = EnumDeclaration(def.Name)
|
||||||
|
.WithAttributeLists(MakeTypeIdAttributeLists(def.Id))
|
||||||
.AddModifiers(Public)
|
.AddModifiers(Public)
|
||||||
.AddBaseListTypes(SimpleBaseType(Type<ushort>()));
|
.AddBaseListTypes(SimpleBaseType(Type<ushort>()));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user