XmlSchemas 类

定义

表示 XML 架构的集合。Represents the collection of XML schemas.

此 API 支持产品基础结构,不能在代码中直接使用。

public ref class XmlSchemas : System::Collections::CollectionBase, System::Collections::Generic::IEnumerable<System::Xml::Schema::XmlSchema ^>
public class XmlSchemas : System.Collections.CollectionBase, System.Collections.Generic.IEnumerable<System.Xml.Schema.XmlSchema>
type XmlSchemas = class
    inherit CollectionBase
    interface seq<XmlSchema>
    interface IEnumerable
Public Class XmlSchemas
Inherits CollectionBase
Implements IEnumerable(Of XmlSchema)
继承
XmlSchemas
实现

构造函数

XmlSchemas()

初始化 XmlSchemas 类的新实例。Initializes a new instance of the XmlSchemas class.

属性

Capacity

获取或设置 CollectionBase 可包含的元素数。Gets or sets the number of elements that the CollectionBase can contain.

(继承自 CollectionBase)
Count

获取包含在 CollectionBase 实例中的元素数。Gets the number of elements contained in the CollectionBase instance. 不能重写此属性。This property cannot be overridden.

(继承自 CollectionBase)
InnerList

获取一个 ArrayList,它包含 CollectionBase 实例中元素的列表。Gets an ArrayList containing the list of elements in the CollectionBase instance.

(继承自 CollectionBase)
IsCompiled

获取一个值,该值指示是否编译了架构。Gets a value that indicates whether the schemas have been compiled.

Item[Int32]

获取或设置位于指定索引处的 XmlSchema 对象。Gets or sets the XmlSchema object at the specified index.

Item[String]

获取指定的 XmlSchema 对象,该对象表示和指定命名空间关联的 XML 架构。Gets a specified XmlSchema object that represents the XML schema associated with the specified namespace.

List

获取一个 IList,它包含 CollectionBase 实例中元素的列表。Gets an IList containing the list of elements in the CollectionBase instance.

(继承自 CollectionBase)

方法

Add(XmlSchema)

将对象添加到集合末尾。Adds an object to the end of the collection.

Add(XmlSchema, Uri)

添加一个 XmlSchema 对象,该对象表示对集合的程序集引用。Adds an XmlSchema object that represents an assembly reference to the collection.

Add(XmlSchemas)

XmlSchemas 类的实例添加到集合的末尾。Adds an instance of the XmlSchemas class to the end of the collection.

AddReference(XmlSchema)

添加一个 XmlSchema 对象,该对象表示对集合的程序集引用。Adds an XmlSchema object that represents an assembly reference to the collection.

Clear()

CollectionBase 实例移除所有对象。Removes all objects from the CollectionBase instance. 不能重写此方法。This method cannot be overridden.

(继承自 CollectionBase)
Compile(ValidationEventHandler, Boolean)

处理 XML 架构中的元素和特性名称,还可以选择验证 XML 架构。Processes the element and attribute names in the XML schemas and, optionally, validates the XML schemas.

Contains(String)

返回一个值,指示该集合是否包含属于指定命名空间的 XmlSchema 对象。Returns a value that indicates whether the collection contains an XmlSchema object that belongs to the specified namespace.

Contains(XmlSchema)

确定 XmlSchemas 是否包含特定架构。Determines whether the XmlSchemas contains a specific schema.

CopyTo(XmlSchema[], Int32)

从目标数组的指定索引处开始将整个 XmlSchemas 复制到兼容的一维 ArrayCopies the entire XmlSchemas to a compatible one-dimensional Array, which starts at the specified index of the target array.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Find(XmlQualifiedName, Type)

将一个 XML 架构放置具有指定名称和类型的 XmlSchemaObject 中。Locates in one of the XML schemas an XmlSchemaObject of the specified name and type.

GetEnumerator()

返回循环访问 CollectionBase 实例的枚举器。Returns an enumerator that iterates through the CollectionBase instance.

(继承自 CollectionBase)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetSchemas(String)

获取属于相同命名空间的架构的集合。Gets a collection of schemas that belong to the same namespace.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IndexOf(XmlSchema)

搜索指定的架构,并返回整个 XmlSchemas 中第一个匹配项的从零开始的索引。Searches for the specified schema and returns the zero-based index of the first occurrence within the entire XmlSchemas.

Insert(Int32, XmlSchema)

将架构插入 XmlSchemas 中的指定索引处。Inserts a schema into the XmlSchemas at the specified index.

IsDataSet(XmlSchema)

静态方法,该方法确定指定 XML 架构是否包含设置为 IsDataSet 的自定义 true 特性或其等效项。Static method that determines whether the specified XML schema contains a custom IsDataSet attribute set to true, or its equivalent.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnClear()

当清除 XmlSchemas 实例的内容时执行其他自定义进程。Performs additional custom processes when clearing the contents of the XmlSchemas instance.

OnClearComplete()

在清除 CollectionBase 实例的内容之后执行其他自定义进程。Performs additional custom processes after clearing the contents of the CollectionBase instance.

(继承自 CollectionBase)
OnInsert(Int32, Object)

在向 XmlSchemas 实例中插入新元素之前执行其他自定义进程。Performs additional custom processes before inserting a new element into the XmlSchemas instance.

OnInsertComplete(Int32, Object)

在向 CollectionBase 实例中插入新元素之后执行其他自定义进程。Performs additional custom processes after inserting a new element into the CollectionBase instance.

(继承自 CollectionBase)
OnRemove(Int32, Object)

当从 XmlSchemas 实例移除元素时执行其他自定义进程。Performs additional custom processes when removing an element from the XmlSchemas instance.

OnRemoveComplete(Int32, Object)

在从 CollectionBase 实例中移除元素之后执行其他自定义进程。Performs additional custom processes after removing an element from the CollectionBase instance.

(继承自 CollectionBase)
OnSet(Int32, Object, Object)

当在 XmlSchemas 实例中设置值之前执行其他自定义进程。Performs additional custom processes before setting a value in the XmlSchemas instance.

OnSetComplete(Int32, Object, Object)

当在 CollectionBase 实例中设置值后执行其他自定义进程。Performs additional custom processes after setting a value in the CollectionBase instance.

(继承自 CollectionBase)
OnValidate(Object)

当验证值时执行其他自定义进程。Performs additional custom processes when validating a value.

(继承自 CollectionBase)
Remove(XmlSchema)

XmlSchemas 中移除特定架构的第一个匹配项。Removes the first occurrence of a specific schema from the XmlSchemas.

RemoveAt(Int32)

移除 CollectionBase 实例的指定索引处的元素。Removes the element at the specified index of the CollectionBase instance. 此方法不可重写。This method is not overridable.

(继承自 CollectionBase)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

显式界面实现

ICollection.CopyTo(Array, Int32)

从目标数组的指定索引处开始将整个 CollectionBase 复制到兼容的一维 ArrayCopies the entire CollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.

(继承自 CollectionBase)
ICollection.IsSynchronized

获取一个值,该值指示是否同步对 CollectionBase 的访问(线程安全)。Gets a value indicating whether access to the CollectionBase is synchronized (thread safe).

(继承自 CollectionBase)
ICollection.SyncRoot

获取可用于同步对 CollectionBase 的访问的对象。Gets an object that can be used to synchronize access to the CollectionBase.

(继承自 CollectionBase)
IEnumerable<XmlSchema>.GetEnumerator()

返回循环访问 XML 架构集合的枚举器。Returns an enumerator that iterates through the collection of XML schemas.

IList.Add(Object)

将对象添加到 CollectionBase 的结尾处。Adds an object to the end of the CollectionBase.

(继承自 CollectionBase)
IList.Contains(Object)

确定 CollectionBase 是否包含特定元素。Determines whether the CollectionBase contains a specific element.

(继承自 CollectionBase)
IList.IndexOf(Object)

搜索指定的 Object,并返回整个 CollectionBase 中第一个匹配项的从零开始的索引。Searches for the specified Object and returns the zero-based index of the first occurrence within the entire CollectionBase.

(继承自 CollectionBase)
IList.Insert(Int32, Object)

将元素插入 CollectionBase 的指定索引处。Inserts an element into the CollectionBase at the specified index.

(继承自 CollectionBase)
IList.IsFixedSize

获取一个值,该值指示 CollectionBase 是否具有固定大小。Gets a value indicating whether the CollectionBase has a fixed size.

(继承自 CollectionBase)
IList.IsReadOnly

获取一个值,该值指示 CollectionBase 是否为只读。Gets a value indicating whether the CollectionBase is read-only.

(继承自 CollectionBase)
IList.Item[Int32]

获取或设置指定索引处的元素。Gets or sets the element at the specified index.

(继承自 CollectionBase)
IList.Remove(Object)

CollectionBase 中移除特定对象的第一个匹配项。Removes the first occurrence of a specific object from the CollectionBase.

(继承自 CollectionBase)

扩展方法

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于