ASN1C C# Runtime Library
7.8
|
Public Member Functions | |
bool | ConsumeStartElement (String namespaceURI, String localName, String qName, XmlAttributes atts) |
virtual void | EndGroup () |
override void | Error (System.Xml.XmlException exception) |
override void | FatalError (System.Xml.XmlException exception) |
virtual void | Init (int startLevel) |
bool | IsDecodingAsGroup () |
void | SetComplete () |
override void | Warning (System.Xml.XmlException exception) |
![]() | |
virtual void | Characters (char[] ch, int start, int length) |
virtual void | EndDocument () |
virtual void | EndElement (System.String ns, System.String localName, System.String qName) |
virtual void | EndPrefixMapping (System.String prefix) |
virtual void | IgnorableWhitespace (char[] chars, int start, int length) |
virtual void | ProcessingInstruction (System.String target, System.String data) |
virtual XmlSource | ResolveEntity (System.String publicId, System.String systemId) |
virtual void | SetDocumentLocator (XmlSaxLocator locator) |
virtual void | SkippedEntity (System.String name) |
virtual void | StartDocument () |
virtual void | StartElement (System.String ns, System.String localName, System.String qName, XmlAttributes attributes) |
virtual void | StartPrefixMapping (System.String prefix, System.String uri) |
Protected Attributes | |
bool | mConsumedStartElement |
Properties | |
bool | Complete [get] |
virtual int | State [get] |
This class extends the DefaultHandler SAX handler class to add items specific to ASN.1 XER encoding.
bool ConsumeStartElement | ( | String | namespaceURI, |
String | localName, | ||
String | qName, | ||
XmlAttributes | atts | ||
) |
This method should be used in preference to invoking StartElement directly when a parent SAX handler is delegating to a child SAX handler.
Using this method gives the StartElement method the opportunity to set the mConsumedStartEvent flag to false to signal that the given element does not belong to the group and that the group is complete. This method invokes the StartElement event and returns the resulting value of the mConsumedStartElement flag (true, unless the StartElement method explicitly sets it to false). If mConsumedStartElement is set to false, this method will invoke SetComplete, marking the handler complete and triggering the EndGroup event, if it has not already fired.
If the StartElement method is certain that some other element is required instead of the one given, it is preferable to throw Asn1XmlSaxUnexpElemExc to indicate this. Otherwise, if the given element does not belong to the group being decoded, mConsumedStartElement can be set false and the element ignored. It is then up to the parent SAX handler to recognize the element as part of a different group or report it as an unexpected element. The StartElement method should not set mConsumedStartEvent false except when mLevel <= mStartLevel, since this is a precondition for SetComplete.
Asn1XmlSaxUnexpElemExc | if certain that some other element is expected. |
|
virtual |
This event method should be invoked when the group being decoded by this handler is decided to be complete. Subclasses may implement this event method to do things such as check for missing required elements. This event will be triggerd, when appropriate, by ConsumeStartElement. Subclasses may invoke it directly when appropriate, but the preferred method is to invoke it indirectly by invoking SetComplete.
|
virtual |
This method manage when an error exception ocurrs in the parsing process
exception | The exception throws by the parser |
System.Xml.XmlException | The error exception |
Reimplemented from XmlSaxDefaultHandler.
|
virtual |
This method throws a fatal error exception.
exception | The exception thrown by the parser |
System.Xml.XmlException | The error exception |
Reimplemented from XmlSaxDefaultHandler.
|
virtual |
This method initializes the class member variables.
startLevel | The XER level to begin |
bool IsDecodingAsGroup | ( | ) |
Return true if this SAX handler is decoding a group of elements rather than a single element (and possibly its children elements).
void SetComplete | ( | ) |
Invoke this method to mark this SAX handler as being complete. This method will trigger the EndGroup event, if it has not already fired. This is the preferred way for a subclass to trigger the EndGroup event, rather than to invoke EndGroup directly (mainly for consistency). Subclasses should consider invoking this method in the EndElement event when either of the following conditions obtain:
InvalidOperationException | if mLevel != mStartLevel. |
|
virtual |
This method manage when a warning exception ocurrs in the parsing process
exception | The exception Throws by the parser |
System.Xml.XmlException | The warning exception |
Reimplemented from XmlSaxDefaultHandler.
|
protected |
Flag used to signal whether startElement actually handled the given element. See the description of method consumeStartElement
|
get |
Returns true when the SAX handler has finished decoding the group.
|
get |
Gets the current state of the event handler.
Value:
current state