mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 22:03:40 +00:00
Fix verification for C# unions (#7970)
* Fix verification for unions * Run scripts\generate_code.py --------- Co-authored-by: Michael Le <michael.le647@gmail.com>
This commit is contained in:
@@ -37,28 +37,6 @@ public class KeywordsInUnionUnion {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static public class KeywordsInUnionVerify
|
||||
{
|
||||
static public bool Verify(Google.FlatBuffers.Verifier verifier, byte typeId, uint tablePos)
|
||||
{
|
||||
bool result = true;
|
||||
switch((KeywordsInUnion)typeId)
|
||||
{
|
||||
case KeywordsInUnion.@static:
|
||||
result = KeywordTest.KeywordsInTableVerify.Verify(verifier, tablePos);
|
||||
break;
|
||||
case KeywordsInUnion.@internal:
|
||||
result = KeywordTest.KeywordsInTableVerify.Verify(verifier, tablePos);
|
||||
break;
|
||||
default: result = true;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class KeywordsInUnionUnion_JsonConverter : Newtonsoft.Json.JsonConverter {
|
||||
public override bool CanConvert(System.Type objectType) {
|
||||
return objectType == typeof(KeywordsInUnionUnion) || objectType == typeof(System.Collections.Generic.List<KeywordsInUnionUnion>);
|
||||
@@ -102,4 +80,26 @@ public class KeywordsInUnionUnion_JsonConverter : Newtonsoft.Json.JsonConverter
|
||||
}
|
||||
|
||||
|
||||
|
||||
static public class KeywordsInUnionVerify
|
||||
{
|
||||
static public bool Verify(Google.FlatBuffers.Verifier verifier, byte typeId, uint tablePos)
|
||||
{
|
||||
bool result = true;
|
||||
switch((KeywordsInUnion)typeId)
|
||||
{
|
||||
case KeywordsInUnion.@static:
|
||||
result = KeywordTest.KeywordsInTableVerify.Verify(verifier, tablePos);
|
||||
break;
|
||||
case KeywordsInUnion.@internal:
|
||||
result = KeywordTest.KeywordsInTableVerify.Verify(verifier, tablePos);
|
||||
break;
|
||||
default: result = true;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user