ASN1C C# Runtime Library
7.8
|
Public Member Functions | |
void | Copy (byte data) |
void | Copy (byte[] data) |
void | Copy (byte[] data, int off, int len) |
void | Copy (System.String data) |
void | DecrLevel () |
void | EncodeBinStrValue (byte[] bits, int nbits) |
void | EncodeByte (byte data) |
void | EncodeData (System.String data) |
void | EncodeEndDocument () |
void | EncodeHexStrValue (byte[] data) |
void | EncodeNamedValueElement (System.String elemName) |
void | EncodeStartDocument () |
void | IncrLevel () |
void | Indent () |
bool | IsCanonical () |
Properties | |
Asn1Context | Context [get] |
This is a base interface for encoding of ASN.1 messages as XML as specified in the W3C standard. It is implemented by both the Asn1XmlEncodeBuffer and Asn1XmlOutputStream.
void Copy | ( | byte | data | ) |
This method is used to copy a single byte to the encode buffer or stream. It first converts the byte to a hex character representation and then copies it to the output buffer.
Throws C# Exception, If I/O error occurs.
data | The byte value to copy |
Implemented in Asn1XmlOutputStream, and Asn1XerOutputStream.
Referenced by Asn1XmlAnyElem.Asn1XmlAnyElem(), Asn1Integer.Decode32Bit(), Asn1StringOID.DecodeXER(), Asn1ObjectIdentifier.DecodeXER(), Asn1Integer.DecodeXER(), Asn1BigInteger.DecodeXER(), Asn1BitString.DecodeXER(), Asn1Enumerated.Encode(), Asn1Real10.Encode(), Asn1ObjectIdentifier.Encode(), Asn1StringRelativeOID.Encode(), Asn1StringOID.Encode(), Asn1RelativeOID.Encode(), Asn1OpenType.Encode(), Asn1OctetString.Encode(), Asn1Real.Encode(), Asn1BitString.Encode(), Asn1Base64BinaryString.EncodeAttribute(), Asn1Boolean.EncodeAttribute(), Asn1Real10.EncodeAttribute(), Asn1OctetString.EncodeAttribute(), Asn1Integer.EncodeAttribute(), Asn1BigInteger.EncodeAttribute(), Asn1Real.EncodeAttribute(), Asn1UniversalString.EncodeData(), Asn1XmlUtil.EncodeDouble(), Asn1XmlUtil.EncodeNSAttrs(), Asn1XerUtil.EncodeReal(), Asn1BigInteger.EncodeUnsigned(), Asn1Real.EncodeValue(), and Asn1AbstractTime.EncodeXMLData().
void Copy | ( | byte [] | data | ) |
This method copies multiple bytes to the encode buffer or stream. It is assumed the byte are already formatted into a valid XML encoding type (for example, UTF-8).
Throws C# Exception, If I/O error occurs.
data | Array of bytes to copy to the encode buffer |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, and Asn1XerOutputStream.
void Copy | ( | byte [] | data, |
int | off, | ||
int | len | ||
) |
This method copies multiple bytes to the encode buffer or stream. It is assumed the byte are already formatted into a valid XML encoding type (for example, UTF-8).
Throws C# Exception, If I/O error occurs.
data | Array of bytes to copy to the encode buffer |
off | The offset in array at which to begin copy. |
len | The number of bytes to copy |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, and Asn1XerOutputStream.
void Copy | ( | System.String | data | ) |
This method copies a character string to the encode buffer or stream.
Throws C# Exception, If I/O error occurs.
data | The string value to copy |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, Asn1XerOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.
void DecrLevel | ( | ) |
This method decrements the element nesting level counter.
Implemented in Asn1XmlOutputStream, Asn1XerOutputStream, Asn1XmlEncodeBuffer, and Asn1XerEncodeBuffer.
void EncodeBinStrValue | ( | byte [] | bits, |
int | nbits | ||
) |
This method encodes XML binary string data
Throws C# Exception, If I/O error occurs.
bits | Bit String to encode |
nbits | Number of bits to encode |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.
Referenced by Asn1BitString.DecodeXER(), Asn1BitString.Encode(), and Asn1BitString.GetOerEffectiveMin().
void EncodeByte | ( | byte | data | ) |
This method is used to encode a single byte to the encode buffer or stream. It first converts the byte to a hex character representation and then copies it to the output buffer.
data | The byte value to copy |
Implemented in Asn1XerOutputStream, Asn1XmlOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.
void EncodeData | ( | System.String | data | ) |
This method encodes XML string data
Throws C# Exception, If I/O error occurs.
data | String value to encode |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.
Referenced by Asn1CharString.DecodeXER(), Asn1AbstractTime.EncodeXER(), and Asn1CharString.validate().
void EncodeEndDocument | ( | ) |
This method encodes standard trailor information at the end of the XML document.
Throws C# Exception, If I/O error occurs.
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, Asn1XerOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.
void EncodeHexStrValue | ( | byte [] | data | ) |
This method encodes XML hexadecimal string data
Throws C# Exception, If I/O error occurs.
data | Data to encode |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.
Referenced by Asn1OpenType.Encode(), and Asn1OctetString.Encode().
void EncodeNamedValueElement | ( | System.String | elemName | ) |
This method encodes an XML named value element tag.
Throws C# Exception, If I/O error occurs.
elemName | The name of element. |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.
Referenced by Asn1BitString.DecodeXER(), Asn1BitString.Encode(), and Asn1XerUtil.EncodeReal().
void EncodeStartDocument | ( | ) |
This method encodes standard header information at the beginning of the XML document.
Throws C# Exception, If I/O error occurs.
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XerOutputStream, Asn1XmlOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.
void IncrLevel | ( | ) |
This method increments the element nesting level counter.
Implemented in Asn1XerOutputStream, Asn1XerEncodeBuffer, Asn1XmlOutputStream, and Asn1XmlEncodeBuffer.
void Indent | ( | ) |
This methods indents by adding a new-line followed by whitespace corresponding to the current nesting level to the encode buffer.
Throws C# Exception, If I/O error occurs.
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1XerOutputStream, Asn1XerEncodeBuffer, Asn1XmlOutputStream, and Asn1XmlEncodeBuffer.
Referenced by Asn1XmlAnyElem.Asn1XmlAnyElem(), Asn1BitString.DecodeXER(), Asn1Null.Encode(), Asn1OpenType.Encode(), Asn1OctetString.Encode(), Asn1BitString.Encode(), Asn1OpenType.EncodeAsExtension(), and Asn1BitString.GetOerEffectiveMin().
bool IsCanonical | ( | ) |
For XER, canonical mode turns off extra whitespace output.
Return true if the encoder has been put into canonical mode. For XML and XER, canonical mode signals the generated encoders to always encode ASN.1 elements that have a DEFAULT value.
Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.
|
get |
The Asn1Context associated with this encoder