ASN1C C# Runtime Library  7.8
Public Member Functions | List of all members
Asn1TraceHandler Class Reference
Inheritance diagram for Asn1TraceHandler:
Asn1NamedEventHandler

Public Member Functions

 Asn1TraceHandler ()
 
 Asn1TraceHandler (System.IO.StreamWriter ps)
 
virtual void Characters (System.String svalue, short typeCode)
 
virtual void EndElement (System.String name, int index)
 
virtual void StartElement (System.String name, int index)
 

Detailed Description

This class is a standard named event handler for printing the data in an encoded message in a human-readable format. Note that this handler will work with data encoded using any of the encoding rules (BER, DER, or PER).

Constructor & Destructor Documentation

◆ Asn1TraceHandler() [1/2]

This constructor sets the output stream to standard output.

◆ Asn1TraceHandler() [2/2]

Asn1TraceHandler ( System.IO.StreamWriter  ps)

This constructor sets the output stream to the given StreamWriter.

Parameters
psStreamWriter object

Member Function Documentation

◆ Characters()

virtual void Characters ( System.String  svalue,
short  typeCode 
)
virtual

The characters callback method is invoked when content (primitive data) is encountered. A stringified representation of the parsed value is returned.

Parameters
svalueStringified representation of the parsed value. The representation will be in ASN.1 value format.
typeCodeIdentifier specifying the type of the parsed data variable. The enumerated list of values that might appear here is provided in the the Asn1Type class (see the documentation on this class for a full list of the names).

Implements Asn1NamedEventHandler.

◆ EndElement()

virtual void EndElement ( System.String  name,
int  index 
)
virtual

The endElement callback method is invoked when the end of an element within a constructed type (SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE) is detected.

Parameters
nameName of the parsed element.
indexIndex of element in array. Only used for SEQUENCE OF or SET OF elements. Set to -1 for all others.

Implements Asn1NamedEventHandler.

◆ StartElement()

virtual void StartElement ( System.String  name,
int  index 
)
virtual

The StartElement callback method is invoked when the start of an element within a constructed type (SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE) is encountered.

Parameters
nameName of the parsed element.
indexIndex of element in array. Only used for SEQUENCE OF or SET OF elements. Set to -1 for all others.

Implements Asn1NamedEventHandler.