XmlSerializationReader XmlSerializationReader XmlSerializationReader XmlSerializationReader Class

定義

依據 XmlSerializer 類別控制還原序列化。Controls deserialization by the XmlSerializer class.

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public ref class XmlSerializationReader abstract : System::Xml::Serialization::XmlSerializationGeneratedCode
public abstract class XmlSerializationReader : System.Xml.Serialization.XmlSerializationGeneratedCode
type XmlSerializationReader = class
    inherit XmlSerializationGeneratedCode
Public MustInherit Class XmlSerializationReader
Inherits XmlSerializationGeneratedCode
繼承
XmlSerializationReaderXmlSerializationReaderXmlSerializationReaderXmlSerializationReader

備註

在初始化期間,.NET Framework 的 XML 序列化基礎結構以動態方式產生並編譯暫時類別衍生自抽象的還原序列化XmlSerializationReader類別。During initialization, the .NET Framework XML serialization infrastructure dynamically generates and compiles a temporary class for deserialization that is derived from the abstract XmlSerializationReader class. XmlSerializationReader 也 XML 文件還原序列化在.NET Framework 中實作DiscoveryDocumentServiceDescription物件。XmlSerializationReader is also implemented within the .NET Framework for deserialization of XML documents into DiscoveryDocument and ServiceDescription objects.

您應該不是衍生類別XmlSerializationReaderYou should not derive classes from XmlSerializationReader. 相反地,呼叫其中一種Deserialize方法。Instead, call one of the Deserialize methods.

建構函式

XmlSerializationReader() XmlSerializationReader() XmlSerializationReader() XmlSerializationReader()

初始化 XmlSerializationReader 類別的新執行個體。Initializes a new instance of the XmlSerializationReader class.

屬性

DecodeName DecodeName DecodeName DecodeName

取得或設定值,以便判斷 XML 字串是否會轉譯成有效的 .NET Framework 類型名稱。Gets or sets a value that determines whether XML strings are translated into valid .NET Framework type names.

Document Document Document Document

取得 XML 文件物件,其為 XML 文件正要還原序列化的目標物件。Gets the XML document object into which the XML document is being deserialized.

IsReturnValue IsReturnValue IsReturnValue IsReturnValue

取得或設定值,此值對於 SOAP 1.1 傳回值應該是 trueGets or sets a value that should be true for a SOAP 1.1 return value.

Reader Reader Reader Reader

取得正由 XmlSerializationReader 使用的 XmlReader 物件。Gets the XmlReader object that is being used by XmlSerializationReader.

ReaderCount ReaderCount ReaderCount ReaderCount

取得目前 XmlReader 的計數。Gets the current count of the XmlReader.

方法

AddFixup(XmlSerializationReader+CollectionFixup) AddFixup(XmlSerializationReader+CollectionFixup) AddFixup(XmlSerializationReader+CollectionFixup) AddFixup(XmlSerializationReader+CollectionFixup)

儲存含有回呼方法的物件,然後在必要時呼叫此方法,以填入與 SOAP 編碼陣列或 SOAP 編碼之多重參考項目對應的 .NET Framework 集合或列舉中。Stores an object that contains a callback method that will be called, as necessary, to fill in .NET Framework collections or enumerations that map to SOAP-encoded arrays or SOAP-encoded, multi-referenced elements.

AddFixup(XmlSerializationReader+Fixup) AddFixup(XmlSerializationReader+Fixup) AddFixup(XmlSerializationReader+Fixup) AddFixup(XmlSerializationReader+Fixup)

儲存含有回呼方法執行個體的物件,並在必要時呼叫此方法執行個體,以填入 SOAP 編碼陣列中的物件。Stores an object that contains a callback method instance that will be called, as necessary, to fill in the objects in a SOAP-encoded array.

AddReadCallback(String, String, Type, XmlSerializationReadCallback) AddReadCallback(String, String, Type, XmlSerializationReadCallback) AddReadCallback(String, String, Type, XmlSerializationReadCallback) AddReadCallback(String, String, Type, XmlSerializationReadCallback)

儲存 XmlSerializationReadCallback 委派的實作及其輸入資料,以供稍後的引動過程使用。Stores an implementation of the XmlSerializationReadCallback delegate and its input data for a later invocation.

AddTarget(String, Object) AddTarget(String, Object) AddTarget(String, Object) AddTarget(String, Object)

儲存正在從 SOAP 編碼 multiRef 項目還原序列化的物件,以供稍後透過 GetTarget(String) 方法存取時使用。Stores an object that is being deserialized from a SOAP-encoded multiRef element for later access through the GetTarget(String) method.

CheckReaderCount(Int32, Int32) CheckReaderCount(Int32, Int32) CheckReaderCount(Int32, Int32) CheckReaderCount(Int32, Int32)

檢查還原序列化程式是否已進階。Checks whether the deserializer has advanced.

CollapseWhitespace(String) CollapseWhitespace(String) CollapseWhitespace(String) CollapseWhitespace(String)

從指定字串的開頭和結尾移除所有出現的空白字元。Removes all occurrences of white space characters from the beginning and end of the specified string.

CreateAbstractTypeException(String, String) CreateAbstractTypeException(String, String) CreateAbstractTypeException(String, String) CreateAbstractTypeException(String, String)

建立 InvalidOperationException,表示正在還原序列化的物件應該是抽象的。Creates an InvalidOperationException that indicates that an object being deserialized should be abstract.

CreateBadDerivationException(String, String, String, String, String, String) CreateBadDerivationException(String, String, String, String, String, String) CreateBadDerivationException(String, String, String, String, String, String) CreateBadDerivationException(String, String, String, String, String, String)

XmlReader 的目前位置,使用讀取內部項目選項,從物件的 XML 表示法填入物件。Populates an object from its XML representation at the current location of the XmlReader, with an option to read the inner element.

CreateCtorHasSecurityException(String) CreateCtorHasSecurityException(String) CreateCtorHasSecurityException(String) CreateCtorHasSecurityException(String)

建立 InvalidOperationException,以表示由於建構函式擲回安全性例外狀況,因此無法具現化正在還原序列化的物件。Creates an InvalidOperationException that indicates that an object being deserialized cannot be instantiated because the constructor throws a security exception.

CreateInaccessibleConstructorException(String) CreateInaccessibleConstructorException(String) CreateInaccessibleConstructorException(String) CreateInaccessibleConstructorException(String)

建立 InvalidOperationException,以表示由於沒有可用的建構函式,因此無法具現化正在還原序列化的物件。Creates an InvalidOperationException that indicates that an object being deserialized cannot be instantiated because there is no constructor available.

CreateInvalidCastException(Type, Object) CreateInvalidCastException(Type, Object) CreateInvalidCastException(Type, Object) CreateInvalidCastException(Type, Object)

建立 InvalidCastException,以表示明確的參考轉換已失敗。Creates an InvalidCastException that indicates that an explicit reference conversion failed.

CreateInvalidCastException(Type, Object, String) CreateInvalidCastException(Type, Object, String) CreateInvalidCastException(Type, Object, String) CreateInvalidCastException(Type, Object, String)

建立 InvalidCastException,以表示明確的參考轉換已失敗。Creates an InvalidCastException that indicates that an explicit reference conversion failed.

CreateMissingIXmlSerializableType(String, String, String) CreateMissingIXmlSerializableType(String, String, String) CreateMissingIXmlSerializableType(String, String, String) CreateMissingIXmlSerializableType(String, String, String)

建立 InvalidOperationException,以表示找不到對應至 XML 結構描述資料類型的衍生類型。Creates an InvalidOperationException that indicates that a derived type that is mapped to an XML Schema data type cannot be located.

CreateReadOnlyCollectionException(String) CreateReadOnlyCollectionException(String) CreateReadOnlyCollectionException(String) CreateReadOnlyCollectionException(String)

建立 InvalidOperationException,以表示無法修改 SOAP 編碼的集合類型,而且無法填入其值。Creates an InvalidOperationException that indicates that a SOAP-encoded collection type cannot be modified and its values cannot be filled in.

CreateUnknownConstantException(String, Type) CreateUnknownConstantException(String, Type) CreateUnknownConstantException(String, Type) CreateUnknownConstantException(String, Type)

建立 InvalidOperationException,以表示列舉值無效。Creates an InvalidOperationException that indicates that an enumeration value is not valid.

CreateUnknownNodeException() CreateUnknownNodeException() CreateUnknownNodeException() CreateUnknownNodeException()

建立 InvalidOperationException,以指出 XmlReader 的目前位置代表未知的 XML 節點。Creates an InvalidOperationException that indicates that the current position of XmlReader represents an unknown XML node.

CreateUnknownTypeException(XmlQualifiedName) CreateUnknownTypeException(XmlQualifiedName) CreateUnknownTypeException(XmlQualifiedName) CreateUnknownTypeException(XmlQualifiedName)

建立 InvalidOperationException,以表示類型是未知的。Creates an InvalidOperationException that indicates that a type is unknown.

EnsureArrayIndex(Array, Int32, Type) EnsureArrayIndex(Array, Int32, Type) EnsureArrayIndex(Array, Int32, Type) EnsureArrayIndex(Array, Int32, Type)

確定指定之陣列或複本的大小足以容納指定的索引。Ensures that a given array, or a copy, is large enough to contain a specified index.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
FixupArrayRefs(Object) FixupArrayRefs(Object) FixupArrayRefs(Object) FixupArrayRefs(Object)

填入 SOAP 編碼陣列的值,該陣列的資料類型會對應至 .NET Framework 參考類型。Fills in the values of a SOAP-encoded array whose data type maps to a .NET Framework reference type.

GetArrayLength(String, String) GetArrayLength(String, String) GetArrayLength(String, String) GetArrayLength(String, String)

取得 XmlReader 目前所在之 SOAP 編碼陣列的長度。Gets the length of the SOAP-encoded array where the XmlReader is currently positioned.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetNullAttr() GetNullAttr() GetNullAttr() GetNullAttr()

判斷 XmlReader 目前所在之 XML 項目是否已將 Null 屬性設定為 true 值。Determines whether the XML element where the XmlReader is currently positioned has a null attribute set to the value true.

GetTarget(String) GetTarget(String) GetTarget(String) GetTarget(String)

取得正從 SOAP 編碼 multiRef 項目還原序列化且之前由 AddTarget(String, Object) 所儲存的物件。Gets an object that is being deserialized from a SOAP-encoded multiRef element and that was stored earlier by AddTarget(String, Object).

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetXsiType() GetXsiType() GetXsiType() GetXsiType()

針對位於 XmlReader 目前位置之 XML 項目,取得 xsi:type 屬性的值。Gets the value of the xsi:type attribute for the XML element at the current location of the XmlReader.

InitCallbacks() InitCallbacks() InitCallbacks() InitCallbacks()

初始化回呼方法,以填入對應至 SOAP 編碼 XML 資料的物件。Initializes callback methods that populate objects that map to SOAP-encoded XML data.

InitIDs() InitIDs() InitIDs() InitIDs()

將項目和屬性名稱儲存在 NameTable 物件中。Stores element and attribute names in a NameTable object.

IsXmlnsAttribute(String) IsXmlnsAttribute(String) IsXmlnsAttribute(String) IsXmlnsAttribute(String)

判斷 XML 屬性名稱是否會指出 XML 命名空間。Determines whether an XML attribute name indicates an XML namespace.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
ParseWsdlArrayType(XmlAttribute) ParseWsdlArrayType(XmlAttribute) ParseWsdlArrayType(XmlAttribute) ParseWsdlArrayType(XmlAttribute)

設定 XML 屬性的值 (如果其類型為 Web 服務描述語言 (WSDL) 命名空間中的 arrayType 的話)。Sets the value of the XML attribute if it is of type arrayType from the Web Services Description Language (WSDL) namespace.

ReadElementQualifiedName() ReadElementQualifiedName() ReadElementQualifiedName() ReadElementQualifiedName()

XmlReader 讀取其目前所在項目的完整名稱。Makes the XmlReader read the fully qualified name of the element where it is currently positioned.

ReadEndElement() ReadEndElement() ReadEndElement() ReadEndElement()

XmlReader 讀取 XML 結束標記。Makes the XmlReader read an XML end tag.

ReadNull() ReadNull() ReadNull() ReadNull()

如果目前 XML 項目含有值為 true 的 Null 屬性,則會指示 XmlReader 讀取此項目。Instructs the XmlReader to read the current XML element if the element has a null attribute with the value true.

ReadNullableQualifiedName() ReadNullableQualifiedName() ReadNullableQualifiedName() ReadNullableQualifiedName()

指示 XmlReader 讀取其目前所在項目的完整名稱。Instructs the XmlReader to read the fully qualified name of the element where it is currently positioned.

ReadNullableString() ReadNullableString() ReadNullableString() ReadNullableString()

指示 XmlReader 讀取可能為 null 的簡單純文字 XML 項目。Instructs the XmlReader to read a simple, text-only XML element that could be null.

ReadReference(String) ReadReference(String) ReadReference(String) ReadReference(String)

讀取 href 屬性 (SOAP 1.2 中的 ref 屬性) 的值,這項屬性會用來參考 SOAP 編碼中的 XML 項目。Reads the value of the href attribute (ref attribute for SOAP 1.2) that is used to refer to an XML element in SOAP encoding.

ReadReferencedElement() ReadReferencedElement() ReadReferencedElement() ReadReferencedElement()

從 SOAP 編碼 multiRef XML 項目還原序列化物件。Deserializes an object from a SOAP-encoded multiRef XML element.

ReadReferencedElement(String, String) ReadReferencedElement(String, String) ReadReferencedElement(String, String) ReadReferencedElement(String, String)

從 SOAP 編碼 multiRef XML 項目還原序列化物件。Deserializes an object from a SOAP-encoded multiRef XML element.

ReadReferencedElements() ReadReferencedElements() ReadReferencedElements() ReadReferencedElements()

從 SOAP 訊息中的 SOAP 編碼 multiRef 項目還原序列化物件。Deserializes objects from the SOAP-encoded multiRef elements in a SOAP message.

ReadReferencingElement(String) ReadReferencingElement(String) ReadReferencingElement(String) ReadReferencingElement(String)

從 SOAP 訊息中的 XML 項目還原序列化物件;該訊息包含 multiRef 項目參考。Deserializes an object from an XML element in a SOAP message that contains a reference to a multiRef element.

ReadReferencingElement(String, String, Boolean, String) ReadReferencingElement(String, String, Boolean, String) ReadReferencingElement(String, String, Boolean, String) ReadReferencingElement(String, String, Boolean, String)

從 SOAP 訊息中的 XML 項目還原序列化物件;該訊息包含 multiRef 項目參考。Deserializes an object from an XML element in a SOAP message that contains a reference to a multiRef element.

ReadReferencingElement(String, String, String) ReadReferencingElement(String, String, String) ReadReferencingElement(String, String, String) ReadReferencingElement(String, String, String)

從 SOAP 訊息中的 XML 項目還原序列化物件;該訊息包含 multiRef 項目參考。Deserializes an object from an XML element in a SOAP message that contains a reference to a multiRef element.

ReadSerializable(IXmlSerializable) ReadSerializable(IXmlSerializable) ReadSerializable(IXmlSerializable) ReadSerializable(IXmlSerializable)

XmlReader 的目前位置,從物件的 XML 表示法填入物件。Populates an object from its XML representation at the current location of the XmlReader.

ReadSerializable(IXmlSerializable, Boolean) ReadSerializable(IXmlSerializable, Boolean) ReadSerializable(IXmlSerializable, Boolean) ReadSerializable(IXmlSerializable, Boolean)

此方法支援 .NET Framework 結構而且並非設計直接從程式碼使用。This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.

ReadString(String) ReadString(String) ReadString(String) ReadString(String)

產生呼叫 ReadString() 方法的結果並附加至輸入值。Produces the result of a call to the ReadString() method appended to the input value.

ReadString(String, Boolean) ReadString(String, Boolean) ReadString(String, Boolean) ReadString(String, Boolean)

傳回呼叫 XmlReader 類別的 ReadString() 方法的結果,必要時修剪空白字元,並附加至輸入值。Returns the result of a call to the ReadString() method of the XmlReader class, trimmed of white space if needed, and appended to the input value.

ReadTypedNull(XmlQualifiedName) ReadTypedNull(XmlQualifiedName) ReadTypedNull(XmlQualifiedName) ReadTypedNull(XmlQualifiedName)

讀取允許 Null 值 (xsi:nil = 'true') 的 XML 項目,並傳回泛型 Nullable<T> 值。Reads an XML element that allows null values (xsi:nil = 'true') and returns a generic Nullable<T> value.

ReadTypedPrimitive(XmlQualifiedName) ReadTypedPrimitive(XmlQualifiedName) ReadTypedPrimitive(XmlQualifiedName) ReadTypedPrimitive(XmlQualifiedName)

取得 XmlReader 目前所在之 XML 節點的值。Gets the value of the XML node at which the XmlReader is currently positioned.

ReadXmlDocument(Boolean) ReadXmlDocument(Boolean) ReadXmlDocument(Boolean) ReadXmlDocument(Boolean)

指示 XmlReader 讀取其目前所在位置的 XML 文件根項目。Instructs the XmlReader to read an XML document root element at its current position.

ReadXmlNode(Boolean) ReadXmlNode(Boolean) ReadXmlNode(Boolean) ReadXmlNode(Boolean)

指示 XmlReader 讀取目前所在位置的 XML 節點。Instructs the XmlReader to read the XML node at its current position.

Referenced(Object) Referenced(Object) Referenced(Object) Referenced(Object)

儲存要從 SOAP 編碼 multiRef 項目還原序列化的物件。Stores an object to be deserialized from a SOAP-encoded multiRef element.

ResolveDynamicAssembly(String) ResolveDynamicAssembly(String) ResolveDynamicAssembly(String) ResolveDynamicAssembly(String)

根據名稱取得動態產生的組件。Gets a dynamically generated assembly by name.

ShrinkArray(Array, Int32, Type, Boolean) ShrinkArray(Array, Int32, Type, Boolean) ShrinkArray(Array, Int32, Type, Boolean) ShrinkArray(Array, Int32, Type, Boolean)

確認給定陣列或複本的大小並未超過指定的長度。Ensures that a given array, or a copy, is no larger than a specified length.

ToByteArrayBase64(Boolean) ToByteArrayBase64(Boolean) ToByteArrayBase64(Boolean) ToByteArrayBase64(Boolean)

指示 XmlReader 讀取其目前位置的字串值,並以 Base-64 位元組陣列形式傳回此值。Instructs the XmlReader to read the string value at its current position and return it as a base-64 byte array.

ToByteArrayBase64(String) ToByteArrayBase64(String) ToByteArrayBase64(String) ToByteArrayBase64(String)

從輸入字串產生 Base-64 位元組陣列。Produces a base-64 byte array from an input string.

ToByteArrayHex(Boolean) ToByteArrayHex(Boolean) ToByteArrayHex(Boolean) ToByteArrayHex(Boolean)

指示 XmlReader 讀取其目前位置的字串值,並以十六進位位元組陣列形式傳回此值。Instructs the XmlReader to read the string value at its current position and return it as a hexadecimal byte array.

ToByteArrayHex(String) ToByteArrayHex(String) ToByteArrayHex(String) ToByteArrayHex(String)

從輸入字串產生十六進位位元組陣列。Produces a hexadecimal byte array from an input string.

ToChar(String) ToChar(String) ToChar(String) ToChar(String)

從輸入字串產生 Char 物件。Produces a Char object from an input string.

ToDate(String) ToDate(String) ToDate(String) ToDate(String)

從輸入字串產生 DateTime 物件。Produces a DateTime object from an input string.

ToDateTime(String) ToDateTime(String) ToDateTime(String) ToDateTime(String)

從輸入字串產生 DateTime 物件。Produces a DateTime object from an input string.

ToEnum(String, Hashtable, String) ToEnum(String, Hashtable, String) ToEnum(String, Hashtable, String) ToEnum(String, Hashtable, String)

從含有分隔識別碼的字串產生數值列舉值,而這些分隔識別碼代表列舉程式清單中的常數。Produces a numeric enumeration value from a string that consists of delimited identifiers that represent constants from the enumerator list.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
ToTime(String) ToTime(String) ToTime(String) ToTime(String)

從代表時間的字串產生 DateTimeProduces a DateTime from a string that represents the time.

ToXmlName(String) ToXmlName(String) ToXmlName(String) ToXmlName(String)

解碼 XML 名稱。Decodes an XML name.

ToXmlNCName(String) ToXmlNCName(String) ToXmlNCName(String) ToXmlNCName(String)

解碼 XML 名稱。Decodes an XML name.

ToXmlNmToken(String) ToXmlNmToken(String) ToXmlNmToken(String) ToXmlNmToken(String)

解碼 XML 名稱。Decodes an XML name.

ToXmlNmTokens(String) ToXmlNmTokens(String) ToXmlNmTokens(String) ToXmlNmTokens(String)

解碼 XML 名稱。Decodes an XML name.

ToXmlQualifiedName(String) ToXmlQualifiedName(String) ToXmlQualifiedName(String) ToXmlQualifiedName(String)

從可能含有前置詞的名稱中取得 XmlQualifiedNameObtains an XmlQualifiedName from a name that may contain a prefix.

UnknownAttribute(Object, XmlAttribute) UnknownAttribute(Object, XmlAttribute) UnknownAttribute(Object, XmlAttribute) UnknownAttribute(Object, XmlAttribute)

XmlReader 的目前位置引發 UnknownAttribute 事件。Raises an UnknownAttribute event for the current position of the XmlReader.

UnknownAttribute(Object, XmlAttribute, String) UnknownAttribute(Object, XmlAttribute, String) UnknownAttribute(Object, XmlAttribute, String) UnknownAttribute(Object, XmlAttribute, String)

XmlReader 的目前位置引發 UnknownAttribute 事件。Raises an UnknownAttribute event for the current position of the XmlReader.

UnknownElement(Object, XmlElement) UnknownElement(Object, XmlElement) UnknownElement(Object, XmlElement) UnknownElement(Object, XmlElement)

XmlReader 的目前位置引發 UnknownElement 事件。Raises an UnknownElement event for the current position of the XmlReader.

UnknownElement(Object, XmlElement, String) UnknownElement(Object, XmlElement, String) UnknownElement(Object, XmlElement, String) UnknownElement(Object, XmlElement, String)

XmlReader 的目前位置引發 UnknownElement 事件。Raises an UnknownElement event for the current position of the XmlReader.

UnknownNode(Object) UnknownNode(Object) UnknownNode(Object) UnknownNode(Object)

XmlReader 的目前位置引發 UnknownNode 事件。Raises an UnknownNode event for the current position of the XmlReader.

UnknownNode(Object, String) UnknownNode(Object, String) UnknownNode(Object, String) UnknownNode(Object, String)

XmlReader 的目前位置引發 UnknownNode 事件。Raises an UnknownNode event for the current position of the XmlReader.

UnreferencedObject(String, Object) UnreferencedObject(String, Object) UnreferencedObject(String, Object) UnreferencedObject(String, Object)

XmlReader 的目前位置引發 UnreferencedObject 事件。Raises an UnreferencedObject event for the current position of the XmlReader.

適用於

另請參閱