DeviceElementCollection 类

定义

警告

此 API 现已过时。

DeviceElement 对象的集合。A collection of DeviceElement objects. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public ref class DeviceElementCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.UI.MobileControls.DeviceElement), AddItemName="device")]
public sealed class DeviceElementCollection : System.Configuration.ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.UI.MobileControls.DeviceElement), AddItemName="device")]
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public sealed class DeviceElementCollection : System.Configuration.ConfigurationElementCollection
type DeviceElementCollection = class
    inherit ConfigurationElementCollection
Public NotInheritable Class DeviceElementCollection
Inherits ConfigurationElementCollection
继承
属性

注解

DeviceElementCollection 类包含从配置文件中读取的 DeviceElement 对象的集合。The DeviceElementCollection class contains a collection of DeviceElement objects that are read from the configuration file. 有关配置文件的结构和内容的详细信息,请参阅<mobileControls >For more information on the structure and contents of the configuration file, see <mobileControls>.

构造函数

DeviceElementCollection()

初始化 DeviceElementCollection 类的新实例。Initializes a new instance of the DeviceElementCollection class. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

属性

AddElementName

在派生的类中重写时,获取或设置 ConfigurationElement 的名称,以便在 ConfigurationElementCollection 中与添加操作关联。Gets or sets the name of the ConfigurationElement to associate with the add operation in the ConfigurationElementCollection when overridden in a derived class.

(继承自 ConfigurationElementCollection)
AllKeys

返回 DeviceElementCollection 集合所包含的设备元素的键的数组。Returns an array of the keys for the device elements that are contained in the DeviceElementCollection collection. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

ClearElementName

在派生的类中重写时,获取或设置 ConfigurationElement 的名称,以便在 ConfigurationElementCollection 中与清除操作关联。Gets or sets the name for the ConfigurationElement to associate with the clear operation in the ConfigurationElementCollection when overridden in a derived class.

(继承自 ConfigurationElementCollection)
CollectionType

获取此 DeviceElementCollection 对象的配置集合类型。Gets the configuration collection type of this DeviceElementCollection object. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Count

获取集合中的元素数。Gets the number of elements in the collection.

(继承自 ConfigurationElementCollection)
CurrentConfiguration

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

(继承自 ConfigurationElement)
ElementInformation

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

(继承自 ConfigurationElement)
ElementName

获取在派生的类中重写时用于标识配置文件中此元素集合的名称。Gets the name used to identify this collection of elements in the configuration file when overridden in a derived class.

(继承自 ConfigurationElementCollection)
ElementProperty

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

(继承自 ConfigurationElement)
EmitClear

获取或设置一个值,该值指定是否已清除集合。Gets or sets a value that specifies whether the collection has been cleared.

(继承自 ConfigurationElementCollection)
EvaluationContext

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

(继承自 ConfigurationElement)
HasContext

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

(继承自 ConfigurationElement)
IsSynchronized

获取一个值,该值指示是否同步对集合的访问。Gets a value indicating whether access to the collection is synchronized.

(继承自 ConfigurationElementCollection)
Item[ConfigurationProperty]

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

(继承自 ConfigurationElement)
Item[Int32]

获取或设置指定索引位置处的设备元素。Gets or sets the device element at the specified index location. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Item[String]

返回具有指定键的设备元素。Returns the device element with the specified key. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

LockAllAttributesExcept

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

(继承自 ConfigurationElement)
LockAllElementsExcept

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

(继承自 ConfigurationElement)
LockAttributes

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

(继承自 ConfigurationElement)
LockElements

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

(继承自 ConfigurationElement)
LockItem

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

(继承自 ConfigurationElement)
Properties

获取属性的集合。Gets the collection of properties.

(继承自 ConfigurationElement)
RemoveElementName

在派生的类中重写时,获取或设置 ConfigurationElement 的名称,以便在 ConfigurationElementCollection 中与移除操作关联。Gets or sets the name of the ConfigurationElement to associate with the remove operation in the ConfigurationElementCollection when overridden in a derived class.

(继承自 ConfigurationElementCollection)
SyncRoot

获取用于同步对 ConfigurationElementCollection 的访问的对象。Gets an object used to synchronize access to the ConfigurationElementCollection.

(继承自 ConfigurationElementCollection)
ThrowOnDuplicate

获取一个值,该值指示尝试向 ConfigurationElement 添加重复的 ConfigurationElementCollection 是否会导致引发异常。Gets a value indicating whether an attempt to add a duplicate ConfigurationElement to the ConfigurationElementCollection will cause an exception to be thrown.

(继承自 ConfigurationElementCollection)

方法

Add(DeviceElement)

将设备元素添加到集合。Adds a device element to the collection. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

BaseAdd(ConfigurationElement)

ConfigurationElementCollection 添加配置元素。Adds a configuration element to the ConfigurationElementCollection.

(继承自 ConfigurationElementCollection)
BaseAdd(ConfigurationElement, Boolean)

向配置元素集合添加配置元素。Adds a configuration element to the configuration element collection.

(继承自 ConfigurationElementCollection)
BaseAdd(Int32, ConfigurationElement)

向配置元素集合添加配置元素。Adds a configuration element to the configuration element collection.

(继承自 ConfigurationElementCollection)
BaseClear()

从集合中移除所有配置元素对象。Removes all configuration element objects from the collection.

(继承自 ConfigurationElementCollection)
BaseGet(Int32)

获取位于指定索引位置的配置元素。Gets the configuration element at the specified index location.

(继承自 ConfigurationElementCollection)
BaseGet(Object)

返回具有指定键的配置元素。Returns the configuration element with the specified key.

(继承自 ConfigurationElementCollection)
BaseGetAllKeys()

返回 ConfigurationElementCollection 中包含的所有配置元素的键数组。Returns an array of the keys for all of the configuration elements contained in the ConfigurationElementCollection.

(继承自 ConfigurationElementCollection)
BaseGetKey(Int32)

获取位于指定索引位置的 ConfigurationElement 的键。Gets the key for the ConfigurationElement at the specified index location.

(继承自 ConfigurationElementCollection)
BaseIndexOf(ConfigurationElement)

获取指定的 ConfigurationElement 的索引。Indicates the index of the specified ConfigurationElement.

(继承自 ConfigurationElementCollection)
BaseIsRemoved(Object)

指示是否已从 ConfigurationElement 中移除具有指定键的 ConfigurationElementCollectionIndicates whether the ConfigurationElement with the specified key has been removed from the ConfigurationElementCollection.

(继承自 ConfigurationElementCollection)
BaseRemove(Object)

从集合中删除 ConfigurationElement 对象。Removes a ConfigurationElement from the collection.

(继承自 ConfigurationElementCollection)
BaseRemoveAt(Int32)

移除位于指定索引位置的 ConfigurationElementRemoves the ConfigurationElement at the specified index location.

(继承自 ConfigurationElementCollection)
Clear()

从集合中移除所有设备元素。Removes all the device elements from the collection. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

CopyTo(ConfigurationElement[], Int32)

ConfigurationElementCollection 的内容复制到数组。Copies the contents of the ConfigurationElementCollection to an array.

(继承自 ConfigurationElementCollection)
CreateNewElement()

在派生的类中重写时,创建一个新的 ConfigurationElementWhen overridden in a derived class, creates a new ConfigurationElement.

(继承自 ConfigurationElementCollection)
CreateNewElement(String)

在派生的类中重写时,创建新的 ConfigurationElementCreates a new ConfigurationElement when overridden in a derived class.

(继承自 ConfigurationElementCollection)
DeserializeElement(XmlReader, Boolean)

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

(继承自 ConfigurationElement)
Equals(Object)

ConfigurationElementCollection 与指定的对象进行比较。Compares the ConfigurationElementCollection to the specified object.

(继承自 ConfigurationElementCollection)
GetElementKey(ConfigurationElement)

在派生类中重写时获取指定配置元素的元素键。Gets the element key for a specified configuration element when overridden in a derived class.

(继承自 ConfigurationElementCollection)
GetEnumerator()

获取用于循环访问 IEnumeratorConfigurationElementCollectionGets an IEnumerator which is used to iterate through the ConfigurationElementCollection.

(继承自 ConfigurationElementCollection)
GetHashCode()

获取表示 ConfigurationElementCollection 实例的唯一值。Gets a unique value representing the ConfigurationElementCollection instance.

(继承自 ConfigurationElementCollection)
GetTransformedAssemblyString(String)

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

(继承自 ConfigurationElement)
GetTransformedTypeString(String)

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

(继承自 ConfigurationElement)
GetType()

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

(继承自 Object)
Init()

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

(继承自 ConfigurationElement)
InitializeDefault()

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

(继承自 ConfigurationElement)
IsElementName(String)

指示指定的 ConfigurationElement 是否存在于 ConfigurationElementCollection 中。Indicates whether the specified ConfigurationElement exists in the ConfigurationElementCollection.

(继承自 ConfigurationElementCollection)
IsElementRemovable(ConfigurationElement)

指示是否可从 ConfigurationElement 中移除指定 ConfigurationElementCollectionIndicates whether the specified ConfigurationElement can be removed from the ConfigurationElementCollection.

(继承自 ConfigurationElementCollection)
IsModified()

在派生的类中重写时,指示从最后一次保存或加载此 ConfigurationElementCollection 后是否对其进行了修改。Indicates whether this ConfigurationElementCollection has been modified since it was last saved or loaded when overridden in a derived class.

(继承自 ConfigurationElementCollection)
IsReadOnly()

指示 ConfigurationElementCollection 对象是否为只读的。Indicates whether the ConfigurationElementCollection object is read only.

(继承自 ConfigurationElementCollection)
ListErrors(IList)

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

(继承自 ConfigurationElement)
MemberwiseClone()

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

(继承自 Object)
OnDeserializeUnrecognizedAttribute(String, String)

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

(继承自 ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

导致配置系统引发异常。Causes the configuration system to throw an exception.

(继承自 ConfigurationElementCollection)
OnRequiredPropertyNotFound(String)

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

(继承自 ConfigurationElement)
PostDeserialize()

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

(继承自 ConfigurationElement)
PreSerialize(XmlWriter)

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

(继承自 ConfigurationElement)
Remove(DeviceElement)

从集合中移除指定的设备元素。Removes the specified device element from the collection. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Remove(String)

从集合中移除已命名的设备元素。Removes the named device element from the collection. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

RemoveAt(Int32)

移除指定索引处的设备元素。Removes the device element at the specified index. 此 API 已过时。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Reset(ConfigurationElement)

在派生的类中重写时,将 ConfigurationElementCollection 重置为其未被修改时的状态。Resets the ConfigurationElementCollection to its unmodified state when overridden in a derived class.

(继承自 ConfigurationElementCollection)
ResetModified()

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

(继承自 ConfigurationElementCollection)
SerializeElement(XmlWriter, Boolean)

在派生的类中重写时,将配置数据写入配置文件中的 XML 元素。Writes the configuration data to an XML element in the configuration file when overridden in a derived class.

(继承自 ConfigurationElementCollection)
SerializeToXmlElement(XmlWriter, String)

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

(继承自 ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

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

(继承自 ConfigurationElement)
SetReadOnly()

IsReadOnly() 对象和所有子元素设置 ConfigurationElementCollection 属性。Sets the IsReadOnly() property for the ConfigurationElementCollection object and for all sub-elements.

(继承自 ConfigurationElementCollection)
ToString()

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

(继承自 Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

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

(继承自 ConfigurationElementCollection)

显式接口实现

ICollection.CopyTo(Array, Int32)

ConfigurationElementCollection 复制到数组。Copies the ConfigurationElementCollection to an array.

(继承自 ConfigurationElementCollection)

扩展方法

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.

适用于

另请参阅