ApplicationDomainCollection 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示 ApplicationDomain 对象集合。
public ref class ApplicationDomainCollection sealed : Microsoft::Web::Administration::ConfigurationElementCollectionBase<Microsoft::Web::Administration::ApplicationDomain ^>
public sealed class ApplicationDomainCollection : Microsoft.Web.Administration.ConfigurationElementCollectionBase<Microsoft.Web.Administration.ApplicationDomain>
type ApplicationDomainCollection = class
inherit ConfigurationElementCollectionBase<ApplicationDomain>
Public NotInheritable Class ApplicationDomainCollection
Inherits ConfigurationElementCollectionBase(Of ApplicationDomain)
- 继承
-
ApplicationDomainCollection
示例
以下示例获取 一个 ApplicationDomainCollection 对象并显示集合计数。
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Administration;
namespace AdministrationSnippets
{
class AplicationDomainCollection
{
public void GetApplications()
{
ServerManager manager = new ServerManager();
foreach (WorkerProcess proc in manager.WorkerProcesses)
{
ApplicationDomainCollection appDomainCollection = proc.ApplicationDomains;
Console.WriteLine(proc.ProcessId.ToString() + ": " +
appDomainCollection.Count.ToString() + " application domains.");
}
}
}
}
注解
属性 Microsoft.Web.Administration.WorkerProcess.ApplicationDomains 返回 对象 ApplicationDomainCollection 。
属性
AllowsAdd |
获取一个值,该值指示元素名称是否 |
AllowsClear |
获取一个值,该值指示是否 |
AllowsRemove |
获取一个值,该值指示是否 |
Attributes |
获取包含此元素的属性列表的配置属性集合。 (继承自 ConfigurationElement) |
ChildElements |
获取当前元素的所有子元素。 (继承自 ConfigurationElement) |
Count |
获取集合中的项数。 (继承自 ConfigurationElementCollectionBase<T>) |
ElementTagName |
表示 ApplicationDomain 对象集合。 (继承自 ConfigurationElement) |
IsLocallyStored |
获取一个值,该值指示配置元素是否存储在特定的配置文件中。 (继承自 ConfigurationElement) |
Item[Int32] |
获取指定索引处的配置元素。 (继承自 ConfigurationElementCollectionBase<T>) |
Item[String] |
获取或设置具有指定名称的属性。 (继承自 ConfigurationElement) |
Methods |
获取配置元素的方法集合。 (继承自 ConfigurationElement) |
RawAttributes |
表示 ApplicationDomain 对象集合。 (继承自 ConfigurationElement) |
Schema |
获取描述配置元素集合的架构。 (继承自 ConfigurationElementCollectionBase<T>) |
方法
显式接口实现
ICollection.CopyTo(Array, Int32) |
从特定的数组索引开始,将集合的元素复制到数组中。 (继承自 ConfigurationElementCollectionBase<T>) |
ICollection.Count |
表示 ApplicationDomain 对象集合。 (继承自 ConfigurationElementCollectionBase<T>) |
ICollection.IsSynchronized |
表示 ApplicationDomain 对象集合。 (继承自 ConfigurationElementCollectionBase<T>) |
ICollection.SyncRoot |
表示 ApplicationDomain 对象集合。 (继承自 ConfigurationElementCollectionBase<T>) |
IEnumerable.GetEnumerator() |
返回一个循环访问集合的枚举器。 (继承自 ConfigurationElementCollectionBase<T>) |