ASN1C C# Runtime Library  7.2
Public Member Functions | List of all members
Asn1TypeIF Interface Reference
Inheritance diagram for Asn1TypeIF:
Asn1Type Asn1ArrayType Asn1BigInteger Asn1BitString Asn1Boolean Asn1CharString Asn1Choice Asn1Enumerated Asn1Integer Asn1Null Asn1ObjectIdentifier Asn1OctetString Asn1OpenExt Asn1Real Asn1SeqOrSet Asn1SeqSetOf Asn1UniversalString Asn1X694OrderElement

Public Member Functions

void Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength)
 
void Decode (Asn1PerDecodeBuffer buffer)
 
void Decode (System.Object reader, System.String xmlURI)
 
void Decode (System.Object reader, System.IO.Stream byteStream)
 
void Decode (Asn1MderDecodeBuffer buffer)
 
int Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging)
 
void Encode (Asn1PerEncodeBuffer buffer)
 
void Encode (Asn1XerEncoder buffer)
 
void Encode (Asn1XerEncoder buffer, System.String elemName)
 
void Encode (Asn1XmlEncoder buffer)
 
void Encode (Asn1XmlEncoder buffer, System.String elemName, System.String nsPrefix)
 
void Encode (Asn1MderOutputStream buffer)
 
void Encode (Asn1BerOutputStream outs, bool explicitTagging)
 
void Encode (Asn1PerOutputStream outs)
 
bool IsOpenType ()
 
void Print (System.IO.TextWriter outs, System.String varName, int level)
 
void SetOpenType ()
 

Detailed Description

This is the base interface for all ASN.1 built-in types.

Member Function Documentation

◆ Decode() [1/5]

void Decode ( Asn1BerDecodeBuffer  buffer,
bool  explicitTagging,
int  implicitLength 
)

This method declaration is the signature of the standard Basic Encoding Rules (BER) or Distinguished Encoding Rules (DER) Decode method.

Parameters
bufferDecode message buffer object
explicitTaggingFlag indicating explicit tag should be parsed from the encoded type.
implicitLengthLength of the contents field (only required if explicit is false).

Implemented in Asn1OpenType, Asn1BitString, Asn1Real, Asn1BigInteger, Asn1UniversalString, Asn1Type, Asn1OctetString, Asn1OpenExt, Asn1UTCTime, Asn1GeneralizedTime, Asn1ObjectIdentifier, Asn1UTF8String, Asn1Time, Asn1BMPString, Asn1OID_IRI, Asn1Boolean, Asn1X694OrderElement, Asn1Integer, Asn1RelativeOID, Asn1PrintableString, Asn1T61String, Asn1GeneralString, Asn1NumericString, Asn1VideotexString, Asn1VisibleString, Asn1Date, Asn1GraphicString, Asn1IA5String, Asn1ObjectDescriptor, Asn1TimeOfDay, Asn1DateTime, Asn1Null, Asn1Real10, Asn1Duration, and Asn1ChoiceExt.

◆ Decode() [2/5]

void Decode ( Asn1PerDecodeBuffer  buffer)

◆ Decode() [3/5]

void Decode ( System.Object  reader,
System.String  xmlURI 
)

This method declaration is the signature of the standard XML Encoding Rules (XER) Decode method.

Throws an IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

Parameters
readerXML reader object
xmlURIURI of a source
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1Type.

◆ Decode() [4/5]

void Decode ( System.Object  reader,
System.IO.Stream  byteStream 
)

This method declaration is the signature of the standard XML Encoding Rules (XER) Decode method.

Throws an IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

Parameters
readerXML reader object
byteStreamInput byte stream object
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1Type.

◆ Decode() [5/5]

void Decode ( Asn1MderDecodeBuffer  buffer)

This method decodes this object's data from an MDER encoding. When MDER code has not been generated, classes implementing this interface may simply throw an exception.

Implemented in Asn1Type, and Asn1OctetString.

◆ Encode() [1/9]

int Encode ( Asn1BerEncodeBuffer  buffer,
bool  explicitTagging 
)

This method declaration is the signature of the standard Basic Encoding Rules (BER) or Distinguished Encoding Rules (DER) encode method.

Parameters
bufferEncode message buffer object
explicitTaggingFlag indicating explicit tag should be added to the encoded type.
Returns
Length of component or negative status value

Implemented in Asn1BitString, Asn1OpenType, Asn1Real, Asn1UniversalString, Asn1BigInteger, Asn1Type, Asn1OctetString, Asn1OpenExt, Asn1UTCTime, Asn1BMPString, Asn1UTF8String, Asn1GeneralizedTime, Asn1ObjectIdentifier, Asn1Boolean, Asn1DateTime, Asn1Time, Asn1OID_IRI, Asn1Integer, Asn1Date, Asn1TimeOfDay, Asn1X694OrderElement, Asn1Duration, Asn1RelativeOID, Asn1Real10, Asn1Enumerated, Asn1PrintableString, Asn1T61String, Asn1Null, Asn1GeneralString, Asn1IA5String, Asn1NumericString, Asn1VideotexString, Asn1VisibleString, Asn1GraphicString, Asn1ObjectDescriptor, and Asn1ChoiceExt.

◆ Encode() [2/9]

void Encode ( Asn1PerEncodeBuffer  buffer)

◆ Encode() [3/9]

void Encode ( Asn1XerEncoder  buffer)

This method declaration is the signature of the standard XML Encoding Rules (XER) encode method. This method invokes the generated method with element name set to null. This will cause the ASN.1 type name to be used as the top-level element name.

Also throws any exception thrown by the underlying stream.

Parameters
bufferXER Encode message buffer object
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1OpenType, Asn1Type, and Asn1OpenExt.

◆ Encode() [4/9]

void Encode ( Asn1XerEncoder  buffer,
System.String  elemName 
)

This method declaration is the signature of the standard XML Encoding Rules (XER) encode method.

Also throws any exception thrown by the underlying stream.

Parameters
bufferXER Encode message buffer object
elemNameXML element name of item
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1Real, Asn1UniversalString, Asn1BigInteger, Asn1BitString, Asn1Integer, Asn1OctetString, Asn1CharString, Asn1Type, Asn1ObjectIdentifier, Asn1Real10, Asn1RelativeOID, Asn1Boolean, Asn1Enumerated, and Asn1Null.

◆ Encode() [5/9]

void Encode ( Asn1XmlEncoder  buffer)

This method declaration is the signature of the standard XML Encoding as specified in the XML schema standard(asn2xsd). This method invokes the generated method with element name and attribute name set to null. This will cause the ASN.1 type name to be used as the top-level element name.

Also throws any exception thrown by the underlying stream.

Parameters
bufferXML Encode message buffer object
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1OpenType, Asn1Type, and Asn1OpenExt.

◆ Encode() [6/9]

void Encode ( Asn1XmlEncoder  buffer,
System.String  elemName,
System.String  nsPrefix 
)

This method declaration is the signature of the standard XML Encoding as specified in the XML schema standard(asn2xsd).

Also throws any exception thrown by the underlying stream.

Parameters
bufferXML Encode message buffer object
elemNameXML element name of item
nsPrefixElement namespace value
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1AbstractTime, Asn1Real, Asn1BitString, Asn1UniversalString, Asn1BigInteger, Asn1Integer, Asn1OctetString, Asn1CharString, Asn1Type, Asn1ObjectIdentifier, Asn1Real10, Asn1RelativeOID, Asn1Boolean, Asn1Enumerated, Asn1Null, and Asn1Base64BinaryString.

◆ Encode() [7/9]

void Encode ( Asn1MderOutputStream  buffer)

This method encodes this object's data to an MDER encoding. When MDER code has not been generated, classes implementing this interface may simply throw an exception.

Implemented in Asn1Type, and Asn1OctetString.

◆ Encode() [8/9]

void Encode ( Asn1BerOutputStream  outs,
bool  explicitTagging 
)

This method declaration is the signature of the streaming oriented BER encode method.

Throws, Exception thrown by C# System.IO.Stream for I/O error

Parameters
outsBER Output Stream object
explicitTaggingFlag indicating explicit tagging should be done
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1BitString, Asn1Real, Asn1UniversalString, Asn1BigInteger, Asn1OctetString, Asn1Integer, Asn1Type, Asn1OpenType, Asn1Real10, Asn1ObjectIdentifier, Asn1OpenExt, Asn1UTF8String, Asn1Boolean, Asn1BMPString, Asn1UTCTime, Asn1GeneralizedTime, Asn1RelativeOID, Asn1Enumerated, Asn1OID_IRI, Asn1Null, Asn1X694OrderElement, Asn1NumericString, Asn1Time, Asn1DateTime, Asn1TimeOfDay, Asn1Date, Asn1Duration, Asn1ChoiceExt, Asn1PrintableString, Asn1T61String, Asn1GeneralString, Asn1IA5String, Asn1VisibleString, Asn1GraphicString, Asn1ObjectDescriptor, and Asn1VideotexString.

◆ Encode() [9/9]

void Encode ( Asn1PerOutputStream  outs)

This method declaration is the signature of the streaming oriented PER encode method.

Also throws any exception thrown by the Asn1PerOutputStream.

Parameters
outsPER Output Stream object
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1Real, Asn1BitString, Asn1UniversalString, Asn1BigInteger, Asn1OctetString, Asn1Type, Asn1Integer, Asn1AbstractTime, Asn1OpenType, Asn1Real10, Asn1ObjectIdentifier, Asn1UTF8String, Asn1OpenExt, Asn1Boolean, Asn1BMPString, Asn1RelativeOID, Asn1OID_IRI, Asn1Null, Asn1X694OrderElement, Asn1DateTime, Asn1TimeOfDay, Asn1Duration, Asn1Date, Asn18BitCharString, Asn1VarWidthCharString, and Asn1ChoiceExt.

◆ IsOpenType()

bool IsOpenType ( )

Returns open type mode for XML encoding/decoding.

Returns
true if open type mode is on.

Implemented in Asn1Type.

◆ Print()

void Print ( System.IO.TextWriter  outs,
System.String  varName,
int  level 
)

This method declaration is the signature of the standard print method used to print the contents of the object representing the ASN.1 type.

Parameters
outsOutput print stream
varNameName of the variable being printed
levelIndentation level

Implemented in Asn1Type, Asn1X694OrderElement, and Asn1ArrayType.

◆ SetOpenType()

void SetOpenType ( )

Sets open type mode for XML encoding/decoding.

Implemented in Asn1Type.