ClientTargetCollection クラス
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ClientTarget オブジェクトのコレクションを表します。 このクラスは継承できません。
public ref class ClientTargetCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ClientTarget))]
public sealed class ClientTargetCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ClientTarget))>]
type ClientTargetCollection = class
inherit ConfigurationElementCollection
Public NotInheritable Class ClientTargetCollection
Inherits ConfigurationElementCollection
- 継承
- 属性
次のコード例は、既存の Web アプリケーションの ClientTargetCollection 構成ファイルから オブジェクトを取得する方法を示しています。
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the <clientTarget> section.
ClientTargetSection clientTargetSection =
(ClientTargetSection)configuration.GetSection(
"system.web/clientTarget");
// Get the client target collection.
ClientTargetCollection clientTargets =
clientTargetSection.ClientTargets;
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the <clientTarget> section.
Dim clientTargetSection _
As ClientTargetSection = _
CType(configuration.GetSection( _
"system.web/clientTarget"), _
ClientTargetSection)
' Get the client target collection.
Dim clientTargets _
As ClientTargetCollection = _
clientTargetSection.ClientTargets
次の例は、構成ファイルからの抜粋を示しています。
<clientTarget>
<add alias=
"uplevel"
userAgent="Mozilla/5.0 (compatible;MSIE 6.0;Windows NT 5.1)"/>
<add alias="downlevel" userAgent="Generic Downlevel"/>
</clientTarget>
型をClientTargetCollection使用すると、セクション要素コレクションの要素にClientTargetClientTargetSectionアクセスできます。
と を含むClientTargetClientTargetSectionグループに属しています。
Client |
ClientTargetCollection クラスの新しいインスタンスを初期化します。 |
ICollection. |
ConfigurationElementCollection を配列にコピーします。 (継承元 ConfigurationElementCollection) |
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。 |
Of |
指定された型に基づいて IEnumerable の要素をフィルター処理します。 |
As |
クエリの並列化を有効にします。 |
As |
IEnumerable を IQueryable に変換します。 |
製品 | バージョン |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。