Share via


ApplicationCollection クラス

定義

オブジェクトのオブジェクトの Application コレクションを Site 表します。

public ref class ApplicationCollection sealed : Microsoft::Web::Administration::ConfigurationElementCollectionBase<Microsoft::Web::Administration::Application ^>
public sealed class ApplicationCollection : Microsoft.Web.Administration.ConfigurationElementCollectionBase<Microsoft.Web.Administration.Application>
type ApplicationCollection = class
    inherit ConfigurationElementCollectionBase<Application>
Public NotInheritable Class ApplicationCollection
Inherits ConfigurationElementCollectionBase(Of Application)
継承

次の例では、既定の Web サイトの ApplicationCollection オブジェクト内のすべてのアプリケーションを表示します。

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Administration;
using Microsoft.Web.Management;

namespace AdministrationSnippets
{
    public class AdministrationApplicationCollection
    {
// Displays all Applications under the "Default Web Site"
public void GetApplications()
{
    ServerManager manager = new ServerManager();
    Site defaultSite = manager.Sites["Default Web Site"];

    foreach (Application app in defaultSite.Applications)
    {
        Console.WriteLine("Found an application: {0}", app.Path);
    }
}
    }
}

注釈

このクラスはシールされており、パブリック コンストラクターを実装しません。 クラスには、 クラスの ApplicationCollectionSite プロパティをApplications使用してアクセスできます。

ApplicationCollection では、IEnumerable<T> インターフェイスを実装します。 メソッドを Add 使用して新しいアプリケーションを作成します。 さらに、インデクサーを使用して、位置またはアプリケーション名によってコレクション内の項目への参照を取得できます。

プロパティ

AllowsAdd

現在のコレクション スキーマで要素名が add 定義されているかどうかを示す値を取得します。

(継承元 ConfigurationElementCollectionBase<T>)
AllowsClear

現在のコレクション スキーマで要素名が clear 定義されているかどうかを示す値を取得します。

(継承元 ConfigurationElementCollectionBase<T>)
AllowsRemove

現在のコレクション スキーマで要素名が remove 定義されているかどうかを示す値を取得します。

(継承元 ConfigurationElementCollectionBase<T>)
Attributes

この要素の属性の一覧を含む構成属性コレクションを取得します。

(継承元 ConfigurationElement)
ChildElements

現在の要素のすべての子要素を取得します。

(継承元 ConfigurationElement)
Count

コレクション内の項目の数を取得します。

(継承元 ConfigurationElementCollectionBase<T>)
ElementTagName

オブジェクトのオブジェクトの Application コレクションを Site 表します。

(継承元 ConfigurationElement)
IsLocallyStored

構成要素が特定の構成ファイルに格納されているかどうかを示す値を取得します。

(継承元 ConfigurationElement)
Item[Int32]

指定したインデックス位置にある構成要素を取得します。

(継承元 ConfigurationElementCollectionBase<T>)
Item[String]

コレクション内の指定したパスを持つアプリケーションを取得します。

Methods

構成要素のメソッドのコレクションを取得します。

(継承元 ConfigurationElement)
RawAttributes

オブジェクトのオブジェクトの Application コレクションを Site 表します。

(継承元 ConfigurationElement)
Schema

構成要素コレクションを記述するスキーマを取得します。

(継承元 ConfigurationElementCollectionBase<T>)

メソッド

Add(String, String)

指定したパラメーターを使用して新しいアプリケーションを作成し、アプリケーション コレクションに追加します。

Add(T)

現在のコレクションの末尾に構成要素を追加します。

(継承元 ConfigurationElementCollectionBase<T>)
AddAt(Int32, T)

指定したインデックス位置にある現在のコレクションに構成要素を追加します。

(継承元 ConfigurationElementCollectionBase<T>)
Clear()

現在のコレクションからすべての構成要素をクリアします。

(継承元 ConfigurationElementCollectionBase<T>)
CreateElement()

現在のコレクションの新しい子要素を作成します。

(継承元 ConfigurationElementCollectionBase<T>)
CreateElement(String)

指定した名前を使用して、新しい子要素を作成します。

(継承元 ConfigurationElementCollectionBase<T>)
CreateNewElement(String)

指定した要素名を使用して、新しい要素を作成します。

(継承元 ConfigurationElementCollectionBase<T>)
Delete()

オブジェクトのオブジェクトの Application コレクションを Site 表します。

(継承元 ConfigurationElement)
GetAttribute(String)

要求された属性を ConfigurationAttribute 表す オブジェクトを返します。

(継承元 ConfigurationElement)
GetAttributeValue(String)

指定した属性の値を返します。

(継承元 ConfigurationElement)
GetChildElement(String)

現在の構成要素の下にあり、指定した名前を持つ子要素を返します。

(継承元 ConfigurationElement)
GetChildElement(String, Type)

現在の構成要素の下にあり、指定した名前と型を持つ子要素を返します。

(継承元 ConfigurationElement)
GetCollection()

現在の構成要素の既定のコレクションを返します。

(継承元 ConfigurationElement)
GetCollection(String)

現在の構成要素に属するすべての構成要素を返します。

(継承元 ConfigurationElement)
GetCollection(String, Type)

指定した名前と型を持ち、現在の構成要素の下にある構成要素を返します。

(継承元 ConfigurationElement)
GetCollection(Type)

指定した型を持ち、現在の構成要素の下にある構成要素を返します。

(継承元 ConfigurationElement)
GetEnumerator()

コレクションを反復処理する列挙子を返します。

(継承元 ConfigurationElementCollectionBase<T>)
GetMetadata(String)

要素スキーマからメタデータ値を返します。

(継承元 ConfigurationElement)
IndexOf(T)

コレクション内の要素のインデックスを決定します。

(継承元 ConfigurationElementCollectionBase<T>)
InvalidApplicationPathCharacters()

アプリケーションのパスで使用できない文字の配列を取得します。

Remove(T)

要素の最初の出現箇所をコレクションから削除します。

(継承元 ConfigurationElementCollectionBase<T>)
RemoveAt(Int32)

コレクションの指定したインデックス位置にある 要素を削除します。

(継承元 ConfigurationElementCollectionBase<T>)
SetAttributeValue(String, Object)

指定した属性の値を設定します。

(継承元 ConfigurationElement)
SetMetadata(String, Object)

要素スキーマのメタデータ値を設定します。

(継承元 ConfigurationElement)

明示的なインターフェイスの実装

ICollection.CopyTo(Array, Int32)

特定の配列インデックスを開始位置として、配列にコレクションの要素をコピーします。

(継承元 ConfigurationElementCollectionBase<T>)
ICollection.Count

オブジェクトのオブジェクトの Application コレクションを Site 表します。

(継承元 ConfigurationElementCollectionBase<T>)
ICollection.IsSynchronized

オブジェクトのオブジェクトの Application コレクションを Site 表します。

(継承元 ConfigurationElementCollectionBase<T>)
ICollection.SyncRoot

オブジェクトのオブジェクトの Application コレクションを Site 表します。

(継承元 ConfigurationElementCollectionBase<T>)
IEnumerable.GetEnumerator()

コレクションを反復処理する列挙子を返します。

(継承元 ConfigurationElementCollectionBase<T>)

適用対象