Show / Hide Table of Contents

Class XmlUnknown

Abstract base class for XML serializable classes that are intended to retain any unknown XML elements or attributes loaded from an XML file.

Inheritance
Object
XmlUnknown
AccessPoint
AccessPointList
AppEntry
AppList
AutoPlayEvent
Capability
CapabilityList
FileTypeExtension
KnownProtocolPrefix
Verb
Catalog
Feed
FeedElement
FeedPreferences
ImplementationPreferences
InterfacePreferences
Selections
Implements
IEquatable<XmlUnknown>
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public abstract class XmlUnknown : Object
Remarks

Inheriting from this class will prevent the UnknownElement event from being triggered.

Constructors

XmlUnknown()

Declaration
protected XmlUnknown()

Fields

UnknownAttributes

Contains any unknown additional XML attributes.

Declaration
public XmlAttribute[] UnknownAttributes
Field Value
Type Description
XmlAttribute[]

UnknownElements

Contains any unknown additional XML elements.

Declaration
public XmlElement[] UnknownElements
Field Value
Type Description
XmlElement[]

Methods

EnsureAttribute(Object, String)

Ensures that a value deserialized from an XML attribute is set (not null).

Declaration
protected void EnsureAttribute(object value, string attributeName)
Parameters
Type Name Description
Object value

The mapped value to check.

String attributeName

The name of the XML attribute.

Exceptions
Type Condition
InvalidDataException

value is null.

EnsureAttributeSafeID(String, String)

Ensures that a value deserialized from an XML attribute is set (not null) and only contains alphanumeric characters, spaces ( ), dots (.), underscores (_), hyphens (-) and plus signs (+).

Declaration
protected void EnsureAttributeSafeID(string value, string attributeName)
Parameters
Type Name Description
String value

The mapped value to check.

String attributeName

The name of the XML attribute.

Exceptions
Type Condition
InvalidDataException

value is invalid.

Equals(XmlUnknown)

Declaration
public bool Equals(XmlUnknown other)
Parameters
Type Name Description
XmlUnknown other
Returns
Type Description
Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

ToShortXml()

Returns a shortened XML representation (with attributes but without child elements).

Declaration
public string ToShortXml()
Returns
Type Description
String
Remarks

Intended for use in error messages. Not suitable for parsing. Use ToXmlString(Object, String) instead if you need a full XML representation.

Implements

System.IEquatable<T>
In This Article
Back to top Copyright Bastian Eicher et al