BackupEndpointCollection 类
定义
表示一个配置元素,此元素包含 BackupEndpointElement 对象的集合。Represents a configuration element that contains a collection of BackupEndpointElement objects.
public ref class BackupEndpointCollection : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.ServiceModel.Routing.Configuration.BackupEndpointElement))]
public class BackupEndpointCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.ServiceModel.Routing.Configuration.BackupEndpointElement))>]
type BackupEndpointCollection = class
inherit ConfigurationElementCollection
Public Class BackupEndpointCollection
Inherits ConfigurationElementCollection
- 继承
- 属性
注解
BackupEndpointCollection 包含终结点的有序集合,如果在将消息发送到主要终结点时发生通信异常,则会将消息传输到此集合。The BackupEndpointCollection contains an ordered collection of endpoints that a message will be transmitted to in the event of a communications exception when sending to the primary endpoint.
如果发送到中包含的主终结点 EndpointName 失败并出现通信异常,路由服务将尝试将消息发送到 BackupEndpointCollection 中包含的第一个终结点。If a send to the primary endpoint contained in EndpointName fails with a communications exception, the Routing Service will attempt to send the message to the first endpoint contained in the BackupEndpointCollection. 如果此发送操作也因发生通信异常而导致失败,则路由服务会尝试将消息发送到集合中包含的下一个终结点直到成功发送为止,除了返回通信异常之外,还会返回操作失败的信息,否则集合中的所有终结点都返回操作失败的信息。If this also fails with a communications exception, the Routing Service will attempt to send the message to the next endpoint contained in the collection until the send attempt succeeds, returns a failure other than a communication exception, or all endpoints in the collection have returned a failure.
在以下示例中,如果发送到名为 "Destination" 的主终结点返回通信异常,则该服务将尝试将消息发送到 "alternateServiceQueue"。In the following example, if a send to the primary endpoint named "Destination" returns a communication exception, the service will attempt to send the message to the "alternateServiceQueue". 如果此尝试也返回一个通信异常,则路由服务会尝试将消息发送到集合中的下一个终结点。If this attempt also returns a communication exception, the Routing Service will attempt to send the message to the next endpoint in the collection.
<filterTables>
<filterTable name="filterTable1">
<add filterName="MatchAllFilter1" endpointName="Destination" backupList="backupEndpointList"/>
</filterTable>
</filterTables>
<backupLists>
<backupList name="backupEndpointList">
<add endpointName="backupServiceQueue" />
<add endpointName="alternateServiceQueue" />
</backupList>
</backupLists>
构造函数
| BackupEndpointCollection() |
创建 BackupEndpointCollection 类的新实例。Creates a new instance of the BackupEndpointCollection class. |
属性
| 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) |
| 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 |
获取 ConfigurationElementCollection 的类型。Gets the type of the ConfigurationElementCollection. (继承自 ConfigurationElementCollection) |
| 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 |
获取包含 ConfigurationElement 对象的不可自定义的信息和功能的 ElementInformation 对象。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 |
获取表示 ConfigurationElement 对象本身的 ConfigurationElementProperty 对象。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 |
获取 ConfigurationElement 对象的 ContextInformation 对象。Gets the ContextInformation object for the ConfigurationElement object. (继承自 ConfigurationElement) |
| HasContext |
获取一个值,该值指示 CurrentConfiguration 属性是否为 |
| 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[String] |
获取或设置此配置元素的属性、特性或子元素。Gets or sets a property, attribute, or child element of this configuration element. (继承自 ConfigurationElement) |
| 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) |
| Name |
获取或设置用于在配置文件中标识此元素集合的名称。Gets or sets the name used to identify this collection of elements in the configuration file. |
| 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(BackupEndpointElement) |
将新 BackupEndpointElement 添加到集合中。Adds a new BackupEndpointElement to the collection. |
| 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 中移除具有指定键的 ConfigurationElementCollection。Indicates 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) |
移除位于指定索引位置的 ConfigurationElement。Removes the ConfigurationElement at the specified index location. (继承自 ConfigurationElementCollection) |
| Clear() |
从集合中删除所有元素。Removes all elements from the collection. |
| CopyTo(ConfigurationElement[], Int32) |
将 ConfigurationElementCollection 的内容复制到数组。Copies the contents of the ConfigurationElementCollection to an array. (继承自 ConfigurationElementCollection) |
| CreateNewElement() |
创建一个新的 ConfigurationElement。Creates a new ConfigurationElement. |
| CreateNewElement(String) |
在派生的类中重写时,创建新的 ConfigurationElement。Creates 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 the specified configuration element. |
| GetEnumerator() |
获取用于循环访问 IEnumerator 的 ConfigurationElementCollection。Gets 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() |
获取当前实例的 Type。Gets 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 中移除指定 ConfigurationElementCollection。Indicates 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(BackupEndpointElement) |
从集合中移除 BackupEndpointElement 的第一个匹配项。Removes the first occurrence of BackupEndpointElement from the collection. |
| Reset(ConfigurationElement) |
在派生的类中重写时,将 ConfigurationElementCollection 重置为其未被修改时的状态。Resets the ConfigurationElementCollection to its unmodified state when overridden in a derived class. (继承自 ConfigurationElementCollection) |
| ResetModified() |
在派生的类中重写时,将 IsModified() 属性的值重置为 |
| 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 转换为 IQueryable。Converts an IEnumerable to an IQueryable. |