Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Asn1ObjectIdentifier.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Threading.Tasks;
7
9{
14 {
15 private readonly bool relative;
16
22 : base()
23 {
24 this.relative = Relative;
25 }
26
30 public bool Relative => this.relative;
31
38 public override Asn1Node Parse(Asn1Document Document, Asn1Macro Macro)
39 {
40 if (Document.ParseValue() is Values.Asn1Oid Value)
41 return Value;
42 else
43 throw Document.SyntaxError("String value expected.");
44 }
45
53 public override Task ExportCSharp(StringBuilder Output, CSharpExportState State, int Indent, CSharpExportPass Pass)
54 {
55 if (Pass == CSharpExportPass.Explicit)
56 Output.Append("ObjectId");
57
58 return Task.CompletedTask;
59 }
60 }
61}
Represents an ASN.1 document.
Definition: Asn1Document.cs:21
Base class for all ASN.1 nodes.
Definition: Asn1Node.cs:38
Abstract base class for ASN.1 types.
Definition: Asn1Type.cs:13
override Asn1Node Parse(Asn1Document Document, Asn1Macro Macro)
Parses the portion of the document at the current position, according to the type.
override Task ExportCSharp(StringBuilder Output, CSharpExportState State, int Indent, CSharpExportPass Pass)
Exports to C#
Asn1ObjectIdentifier(bool Relative)
OBJECT IDENTIFIER, or RELATIVE-OID
CSharpExportPass
Defines different C# export passes.
Definition: Asn1Node.cs:12