Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Asn1Oid.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Threading.Tasks;
5
7{
11 public class Asn1Oid : Asn1Value
12 {
13 private readonly Asn1Node[] values;
14
20 {
21 this.values = Values;
22 }
23
27 public Asn1Node[] Values => this.values;
28
36 public override async Task ExportCSharp(StringBuilder Output, CSharpExportState State,
37 int Indent, CSharpExportPass Pass)
38 {
39 if (Pass == CSharpExportPass.Explicit)
40 {
41 bool First = true;
42
43 Output.Append("new ObjectId(");
44
45 foreach (Asn1Node Node in this.values)
46 {
47 if (First)
48 First = false;
49 else
50 Output.Append(", ");
51
52 await Node.ExportCSharp(Output, State, Indent, Pass);
53 }
54
55 Output.Append(')');
56 }
57 }
58
62 public override string CSharpType => "ObjectId";
63 }
64}
Base class for all ASN.1 nodes.
Definition: Asn1Node.cs:38
virtual Task ExportCSharp(StringBuilder Output, CSharpExportState State, int Indent, CSharpExportPass Pass)
Exports to C#
Definition: Asn1Node.cs:46
Abstract base class for values.
Definition: Asn1Value.cs:11
Represents an ASN.1 Object ID
Definition: Asn1Oid.cs:12
override string CSharpType
Corresponding C# type.
Definition: Asn1Oid.cs:62
override async Task ExportCSharp(StringBuilder Output, CSharpExportState State, int Indent, CSharpExportPass Pass)
Exports to C#
Definition: Asn1Oid.cs:36
Asn1Node[] Values
OID values.
Definition: Asn1Oid.cs:27
Asn1Oid(Asn1Node[] Values)
Represents an ASN.1 Object ID
Definition: Asn1Oid.cs:19
CSharpExportPass
Defines different C# export passes.
Definition: Asn1Node.cs:12