MetadataSet MetadataSet MetadataSet MetadataSet Class

定義

表示 XML 格式之服務中繼資料的序列化集合。Represents a serializable collection of service metadata in XML form.

public ref class MetadataSet : System::Xml::Serialization::IXmlSerializable
public class MetadataSet : System.Xml.Serialization.IXmlSerializable
type MetadataSet = class
    interface IXmlSerializable
Public Class MetadataSet
Implements IXmlSerializable
繼承
MetadataSetMetadataSetMetadataSetMetadataSet
實作

備註

MetadataSet 類別包含 MetadataSection 物件的集合,其中每一個都會包含一種 XML 格式的中繼資料方言。The MetadataSet class contains a collection of MetadataSection objects, each of which contains one dialect of metadata in XML form. 一般來說,MetadataSet 類別可用來將 XML 中繼資料文件群組在 MetadataExporterMetadataImporter 物件 (例如 WsdlImporterWsdlExporter) 之間來回傳遞。Typically, the MetadataSet class is used to pass a group of XML metadata documents to and from MetadataExporter and MetadataImporter objects, such as WsdlImporter and WsdlExporter.

若要從型別為 MetadataSetIEnumerable<T> 物件建立 MetadataSection,請使用 MetadataSet 建構函式 (Constructor)。To create a MetadataSet from a IEnumerable<T> object of type MetadataSection, use the MetadataSet constructor. 若要取得型別為 IEnumerable<T>MetadataSection 物件,請使用 MetadataSections 屬性。To obtain a IEnumerable<T> object of type MetadataSection, use the MetadataSections property.

此外,您可以使用 ReadFrom 方法從 XML 資料載入 MetadataSet,以及使用 WriteTo 方法將內部中繼資料寫入 XML 格式。In addition, you can use the ReadFrom method to load a MetadataSet from XML data and the WriteTo method to write the internal metadata to an XML format.

這個型別會實作 WS-MetadataExchange 規格中定義的結構。This type implements the structure defined in the WS-MetadataExchange specification.

建構函式

MetadataSet() MetadataSet() MetadataSet() MetadataSet()

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

MetadataSet(IEnumerable<MetadataSection>) MetadataSet(IEnumerable<MetadataSection>) MetadataSet(IEnumerable<MetadataSection>) MetadataSet(IEnumerable<MetadataSection>)

初始化 MetadataSet 類別的新執行個體,其中包含指定的 MetadataSection 物件集合。Initializes a new instance of the MetadataSet class that contains the specified collection of MetadataSection objects.

屬性

Attributes Attributes Attributes Attributes

取得 XmlAttribute 物件的集合,會出現在 MetadataSet 序列化格式中。Gets a collection of XmlAttribute objects that appear in the serialized form of the MetadataSet.

MetadataSections MetadataSections MetadataSections MetadataSections

取得表示中繼資料的 MetadataSection 物件集合。Gets a collection of MetadataSection objects that represents the metadata.

方法

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

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ReadFrom(XmlReader) ReadFrom(XmlReader) ReadFrom(XmlReader) ReadFrom(XmlReader)

從指定的 MetadataSet 物件傳回 XmlReaderReturns a MetadataSet from the specified XmlReader object.

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

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

(Inherited from Object)
WriteTo(XmlWriter) WriteTo(XmlWriter) WriteTo(XmlWriter) WriteTo(XmlWriter)

使用指定的 MetadataSet,將 XmlWriter 寫入 XML。Writes the MetadataSet to XML using the specified XmlWriter.

明確介面實作

IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema() IXmlSerializable.GetSchema()

實作 GetSchema() 方法,以提供序列化支援。Implements GetSchema() method to provide serialization support.

IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader) IXmlSerializable.ReadXml(XmlReader)

實作 ReadXml(XmlReader) 方法,以支援從 XML 還原序列化。Implements the ReadXml(XmlReader) method to support deserialization from XML.

IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter) IXmlSerializable.WriteXml(XmlWriter)

實作 WriteXml(XmlWriter) 方法,以支援序列化為 XML。Implements the WriteXml(XmlWriter) method to support serialization to XML.

適用於