ServiceModelExtensionCollectionElement<TServiceModelExtensionElement> ServiceModelExtensionCollectionElement<TServiceModelExtensionElement> ServiceModelExtensionCollectionElement<TServiceModelExtensionElement> ServiceModelExtensionCollectionElement<TServiceModelExtensionElement> Class

定义

ServiceModelExtensionElement 对象集合的抽象基类。An abstract base class for a collection of ServiceModelExtensionElement objects.

generic <typename TServiceModelExtensionElement>
 where TServiceModelExtensionElement : ServiceModelExtensionElementpublic ref class ServiceModelExtensionCollectionElement abstract : System::Configuration::ConfigurationElement, System::Collections::Generic::ICollection<TServiceModelExtensionElement>, System::Collections::Generic::IEnumerable<TServiceModelExtensionElement>
public abstract class ServiceModelExtensionCollectionElement<TServiceModelExtensionElement> : System.Configuration.ConfigurationElement, System.Collections.Generic.ICollection<TServiceModelExtensionElement>, System.Collections.Generic.IEnumerable<TServiceModelExtensionElement> where TServiceModelExtensionElement : ServiceModelExtensionElement
type ServiceModelExtensionCollectionElement<'ServiceModelExtensionElement (requires 'ServiceModelExtensionElement :> ServiceModelExtensionElement)> = class
    inherit ConfigurationElement
    interface ICollection<'ServiceModelExtensionElement (requires 'ServiceModelExtensionElement :> ServiceModelExtensionElement)>
    interface seq<'ServiceModelExtensionElement (requires 'ServiceModelExtensionElement :> ServiceModelExtensionElement)>
    interface IEnumerable
Public MustInherit Class ServiceModelExtensionCollectionElement(Of TServiceModelExtensionElement)
Inherits ConfigurationElement
Implements ICollection(Of TServiceModelExtensionElement), IEnumerable(Of TServiceModelExtensionElement)

类型参数

TServiceModelExtensionElement

一个 ServiceModel 扩展元素。A ServiceModel extension element.

继承
ServiceModelExtensionCollectionElement<TServiceModelExtensionElement>ServiceModelExtensionCollectionElement<TServiceModelExtensionElement>ServiceModelExtensionCollectionElement<TServiceModelExtensionElement>ServiceModelExtensionCollectionElement<TServiceModelExtensionElement>
派生
实现

属性

Count Count Count Count

获取此集合中的项数。Gets the number of items in this collection.

CurrentConfiguration CurrentConfiguration CurrentConfiguration CurrentConfiguration

获取对顶级 Configuration 实例的引用,该实例表示当前 ConfigurationElement 实例所属的配置层次结构。Gets a reference to the top-level Configuration instance that represents the configuration hierarchy that the current ConfigurationElement instance belongs to.

(Inherited from ConfigurationElement)
ElementInformation ElementInformation ElementInformation ElementInformation

获取包含 ConfigurationElement 对象的不可自定义的信息和功能的 ElementInformation 对象。Gets an ElementInformation object that contains the non-customizable information and functionality of the ConfigurationElement object.

(Inherited from ConfigurationElement)
ElementProperty ElementProperty ElementProperty ElementProperty

获取表示 ConfigurationElement 对象本身的 ConfigurationElementProperty 对象。Gets the ConfigurationElementProperty object that represents the ConfigurationElement object itself.

(Inherited from ConfigurationElement)
EvaluationContext EvaluationContext EvaluationContext EvaluationContext

获取 ConfigurationElement 对象的 ContextInformation 对象。Gets the ContextInformation object for the ConfigurationElement object.

(Inherited from ConfigurationElement)
HasContext HasContext HasContext HasContext

获取一个值,该值指示 CurrentConfiguration 属性是否为 nullGets a value that indicates whether the CurrentConfiguration property is null.

(Inherited from ConfigurationElement)
Item[ConfigurationProperty] Item[ConfigurationProperty] Item[ConfigurationProperty] Item[ConfigurationProperty]

获取或设置此配置元素的属性或特性。Gets or sets a property or attribute of this configuration element.

(Inherited from ConfigurationElement)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

获取集合中指定索引处的项。Gets the item at the specified index within the collection.

Item[String] Item[String] Item[String] Item[String]

获取或设置此配置元素的属性、特性或子元素。Gets or sets a property, attribute, or child element of this configuration element.

(Inherited from ConfigurationElement)
Item[Type] Item[Type] Item[Type] Item[Type]

获取集合中指定类型的项。Gets the item of the specified type within the collection.

LockAllAttributesExcept LockAllAttributesExcept LockAllAttributesExcept LockAllAttributesExcept

获取被锁定的特性的集合。Gets the collection of locked attributes.

(Inherited from ConfigurationElement)
LockAllElementsExcept LockAllElementsExcept LockAllElementsExcept LockAllElementsExcept

获取被锁定的元素的集合。Gets the collection of locked elements.

(Inherited from ConfigurationElement)
LockAttributes LockAttributes LockAttributes LockAttributes

获取被锁定的特性的集合Gets the collection of locked attributes

(Inherited from ConfigurationElement)
LockElements LockElements LockElements LockElements

获取被锁定的元素的集合。Gets the collection of locked elements.

(Inherited from ConfigurationElement)
LockItem LockItem LockItem LockItem

获取或设置一个值,该值指示是否已锁定该元素。Gets or sets a value indicating whether the element is locked.

(Inherited from ConfigurationElement)
Properties Properties Properties Properties

获取一个 ConfigurationPropertyCollection 实例,该实例包含一个 ConfigurationProperty 对象集合,这些对象可以是此配置元素的特性或 ConfigurationElement 对象。Gets a ConfigurationPropertyCollection instance that contains a collection of ConfigurationProperty objects that can be attributes or ConfigurationElement objects of this configuration element.

方法

Add(TServiceModelExtensionElement) Add(TServiceModelExtensionElement) Add(TServiceModelExtensionElement) Add(TServiceModelExtensionElement)

将指定元素添加到此配置节。Adds the specified element to this configuration section.

CanAdd(TServiceModelExtensionElement) CanAdd(TServiceModelExtensionElement) CanAdd(TServiceModelExtensionElement) CanAdd(TServiceModelExtensionElement)

将一个新的行为元素添加到此节,并返回一个指示操作是否成功的值。Adds a new behavior element to this section and returns a value that indicates whether the operation is successful.

Clear() Clear() Clear() Clear()

删除此集合中的所有元素。Deletes all elements in this collection. 不能继承此方法。This method cannot be inherited.

Contains(TServiceModelExtensionElement) Contains(TServiceModelExtensionElement) Contains(TServiceModelExtensionElement) Contains(TServiceModelExtensionElement)

返回一个值,该值指示该集合是否包含特定元素。Returns a value that indicates whether this collection contains a specific element. 不能继承此方法。This method cannot be inherited.

ContainsKey(String) ContainsKey(String) ContainsKey(String) ContainsKey(String)

确定该集合是否包含指定名称的元素。Determines whether this collection contains an element of the specified name.

ContainsKey(Type) ContainsKey(Type) ContainsKey(Type) ContainsKey(Type)

确定该集合是否包含指定类型的元素。Determines whether this collection contains an element of the specified type.

CopyTo(TServiceModelExtensionElement[], Int32) CopyTo(TServiceModelExtensionElement[], Int32) CopyTo(TServiceModelExtensionElement[], Int32) CopyTo(TServiceModelExtensionElement[], Int32)

从目标数组的指定索引处开始,将整个集合复制到兼容的一维数组。Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. 不能继承此方法。This method cannot be inherited.

DeserializeElement(XmlReader, Boolean) DeserializeElement(XmlReader, Boolean) DeserializeElement(XmlReader, Boolean) DeserializeElement(XmlReader, Boolean)

从配置文件读取 XML。Reads XML from the configuration file.

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

将当前的 ConfigurationElement 实例与指定的对象进行比较。Compares the current ConfigurationElement instance to the specified object.

(Inherited from ConfigurationElement)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回可遍历集合的 IEnumeratorReturns an IEnumerator that iterates through a collection. 不能继承此方法。This method cannot be inherited.

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

获取表示当前 ConfigurationElement 实例的唯一值。Gets a unique value representing the current ConfigurationElement instance.

(Inherited from ConfigurationElement)
GetTransformedAssemblyString(String) GetTransformedAssemblyString(String) GetTransformedAssemblyString(String) GetTransformedAssemblyString(String)

返回指定程序集名称的转换版本。Returns the transformed version of the specified assembly name.

(Inherited from ConfigurationElement)
GetTransformedTypeString(String) GetTransformedTypeString(String) GetTransformedTypeString(String) GetTransformedTypeString(String)

返回指定类型名称的转换版本。Returns the transformed version of the specified type name.

(Inherited from ConfigurationElement)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
Init() Init() Init() Init()

ConfigurationElement 对象设置为其初始状态。Sets the ConfigurationElement object to its initial state.

(Inherited from ConfigurationElement)
InitializeDefault() InitializeDefault() InitializeDefault() InitializeDefault()

用于初始化 ConfigurationElement 对象的默认值集。Used to initialize a default set of values for the ConfigurationElement object.

(Inherited from ConfigurationElement)
IsModified() IsModified() IsModified() IsModified()

指示自上次保存或加载该配置元素后并在派生类中实现该元素时,该元素是否已被修改。Indicates whether this configuration element has been modified since it was last saved or loaded, when implemented in a derived class.

IsReadOnly() IsReadOnly() IsReadOnly() IsReadOnly()

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

(Inherited from ConfigurationElement)
ListErrors(IList) ListErrors(IList) ListErrors(IList) ListErrors(IList)

将此 ConfigurationElement 对象以及所有子元素中无效属性的错误添加到传递的列表中。Adds the invalid-property errors in this ConfigurationElement object, and in all subelements, to the passed list.

(Inherited from ConfigurationElement)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
OnDeserializeUnrecognizedAttribute(String, String) OnDeserializeUnrecognizedAttribute(String, String) OnDeserializeUnrecognizedAttribute(String, String) OnDeserializeUnrecognizedAttribute(String, String)

获取一个值,该值指示反序列化过程中是否遇到未知特性。Gets a value indicating whether an unknown attribute is encountered during deserialization.

(Inherited from ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader) OnDeserializeUnrecognizedElement(String, XmlReader) OnDeserializeUnrecognizedElement(String, XmlReader) OnDeserializeUnrecognizedElement(String, XmlReader)

获取一个值,该值指示反序列化过程中是否遇到未知元素。Gets a value that indicates whether an unknown element is encountered during deserialization.

OnRequiredPropertyNotFound(String) OnRequiredPropertyNotFound(String) OnRequiredPropertyNotFound(String) OnRequiredPropertyNotFound(String)

找不到所需属性时引发异常。Throws an exception when a required property is not found.

(Inherited from ConfigurationElement)
PostDeserialize() PostDeserialize() PostDeserialize() PostDeserialize()

反序列化后调用。Called after deserialization.

(Inherited from ConfigurationElement)
PreSerialize(XmlWriter) PreSerialize(XmlWriter) PreSerialize(XmlWriter) PreSerialize(XmlWriter)

在序列化之前调用。Called before serialization.

(Inherited from ConfigurationElement)
Remove(TServiceModelExtensionElement) Remove(TServiceModelExtensionElement) Remove(TServiceModelExtensionElement) Remove(TServiceModelExtensionElement)

从集合中移除指定的元素。Removes the specified element from the collection. 不能继承此方法。This method cannot be inherited.

Reset(ConfigurationElement) Reset(ConfigurationElement) Reset(ConfigurationElement) Reset(ConfigurationElement)

在派生类中重写时,会将此集合重置为其未修改时的状态。Resets this collection to its unmodified state when overridden in a derived class.

ResetModified() ResetModified() ResetModified() ResetModified()

在派生的类中重写时,将 IsModified() 属性的值重置为 falseResets the value of the IsModified() property to false when overridden in a derived class.

SerializeElement(XmlWriter, Boolean) SerializeElement(XmlWriter, Boolean) SerializeElement(XmlWriter, Boolean) SerializeElement(XmlWriter, Boolean)

当在派生类中实现后,将此配置元素的内容写入配置文件。Writes the contents of this configuration element to the configuration file when implemented in a derived class.

(Inherited from ConfigurationElement)
SerializeToXmlElement(XmlWriter, String) SerializeToXmlElement(XmlWriter, String) SerializeToXmlElement(XmlWriter, String) SerializeToXmlElement(XmlWriter, String)

当在派生类中实现后,将此配置元素的外部标记写入配置文件。Writes the outer tags of this configuration element to the configuration file when implemented in a derived class.

(Inherited from ConfigurationElement)
SetIsModified() SetIsModified() SetIsModified() SetIsModified()

为此集合设置 IsModified() 属性。Sets the IsModified() property for this collection.

SetPropertyValue(ConfigurationProperty, Object, Boolean) SetPropertyValue(ConfigurationProperty, Object, Boolean) SetPropertyValue(ConfigurationProperty, Object, Boolean) SetPropertyValue(ConfigurationProperty, Object, Boolean)

将属性设置为指定值。Sets a property to the specified value.

(Inherited from ConfigurationElement)
SetReadOnly() SetReadOnly() SetReadOnly() SetReadOnly()

为此集合和所有子元素设置内部 IsReadOnly 属性。Sets the internal IsReadOnly property for this collection and for all sub-elements.

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

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

(Inherited from Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode) Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode) Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode) Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

反转从配置层次结构的不同级别合并配置信息的效果。Reverses the effect of merging configuration information from different levels of the configuration hierarchy.

显式界面实现

ICollection<TServiceModelExtensionElement>.IsReadOnly ICollection<TServiceModelExtensionElement>.IsReadOnly ICollection<TServiceModelExtensionElement>.IsReadOnly ICollection<TServiceModelExtensionElement>.IsReadOnly

获取一个值,该值指示此 ServiceModelExtensionCollectionElement<TServiceModelExtensionElement> 是否为只读。Gets a value that indicates whether this ServiceModelExtensionCollectionElement<TServiceModelExtensionElement> is read-only.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

返回可遍历集合的 IEnumeratorReturns an IEnumerator that iterates through a collection. 不能继承此方法。This method cannot be inherited.

扩展方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) 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) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) 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) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

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

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) 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) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) 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>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

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

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) 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) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) 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>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) 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) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) 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>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) 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>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

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

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

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

适用于

另请参阅