Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
OtherNames.cs
2
4{
9 {
13 public OtherNames()
14 : base([])
15 {
16 }
17
24 public OtherNames(byte[] Value, int NrInstances, string[] OtherNames)
25 : base(Value)
26 {
27 this.NrInstances = NrInstances;
28 this.Names = OtherNames;
29 }
30
34 public override ushort Tag => 0xa0;
35
39 public int NrInstances { get; }
40
44 public string[]? Names { get; }
45
53 public override IDataObject Create(byte[] Value, IDataObject[] Inner, TravelDocumentsClient Client)
54 {
57
58 foreach (IDataObject Object in Inner)
59 {
60 if (Object is NumberOfInstances NumberOfInstances2)
61 NrInstances = NumberOfInstances2;
62 else if (Object is OtherName OtherName)
63 OtherNames.Add(OtherName.StringValue ?? string.Empty);
64 }
65
66 return new OtherNames(Value, NrInstances?.Count ?? 0, [.. OtherNames]);
67 }
68 }
69}
Abstract base class for data objects that contain nested data objects.
OtherNames(byte[] Value, int NrInstances, string[] OtherNames)
List of other names.
Definition: OtherNames.cs:24
string?[] Names
Actual other names reported.
Definition: OtherNames.cs:44
override IDataObject Create(byte[] Value, IDataObject[] Inner, TravelDocumentsClient Client)
Creates a parsed instance of the data object.
Definition: OtherNames.cs:53
int NrInstances
Number of other names reported by the card.
Definition: OtherNames.cs:39
A chunked list is a linked list of chunks of objects of type T .
Definition: ChunkedList.cs:54