MimeTextMatchCollection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
MimeTextMatch クラスのインスタンスのコレクションを提供します。 このクラスは継承できません。
public ref class MimeTextMatchCollection sealed : System::Collections::CollectionBase
public sealed class MimeTextMatchCollection : System.Collections.CollectionBase
type MimeTextMatchCollection = class
inherit CollectionBase
Public NotInheritable Class MimeTextMatchCollection
Inherits CollectionBase
- 継承
例
次の例では、 クラスによって公開されるプロパティとメソッドの使用方法を MimeTextMatchCollection
示します。
// Create the 'InputBinding' object.
InputBinding^ myInputBinding = gcnew InputBinding;
MimeTextBinding^ myMimeTextBinding = gcnew MimeTextBinding;
MimeTextMatchCollection^ myMimeTextMatchCollection;
// Get an array instance of 'MimeTextMatch' class.
array<MimeTextMatch^>^myMimeTextMatch = gcnew array<MimeTextMatch^>(4);
myMimeTextMatchCollection = myMimeTextBinding->Matches;
// Initialize properties of 'MimeTextMatch' class.
for ( myInt = 0; myInt < 4; myInt++ )
{
// Create the 'MimeTextMatch' instance.
myMimeTextMatch[ myInt ] = gcnew MimeTextMatch;
myMimeTextMatch[ myInt ]->Name = "Title";
myMimeTextMatch[ myInt ]->Type = "*/*";
myMimeTextMatch[ myInt ]->IgnoreCase = true;
if ( true == myMimeTextMatchCollection->Contains( myMimeTextMatch[ 0 ] ) )
{
myMimeTextMatch[ myInt ]->Name = String::Format( "Title{0}", Convert::ToString( myInt ) );
myMimeTextMatch[ myInt ]->Capture = 2;
myMimeTextMatch[ myInt ]->Group = 2;
myMimeTextMatchCollection->Add( myMimeTextMatch[ myInt ] );
}
else
{
myMimeTextMatchCollection->Add( myMimeTextMatch[ myInt ] );
myMimeTextMatchCollection[ myInt ]->RepeatsString = "2";
}
}
myMimeTextMatchCollection = myMimeTextBinding->Matches;
// Copy collection to 'MimeTextMatch' array instance.
myMimeTextMatchCollection->CopyTo( myMimeTextMatch, 0 );
myInputBinding->Extensions->Add( myMimeTextBinding );
// Add the 'InputBinding' to 'OperationBinding'.
myOperationBinding->Input = myInputBinding;
// Create the 'OutputBinding' instance.
OutputBinding^ myOutputBinding = gcnew OutputBinding;
// Create the 'MimeTextBinding' instance.
MimeTextBinding^ myMimeTextBinding1 = gcnew MimeTextBinding;
// Get an instance of 'MimeTextMatchCollection'.
MimeTextMatchCollection^ myMimeTextMatchCollection1 = gcnew MimeTextMatchCollection;
array<MimeTextMatch^>^myMimeTextMatch1 = gcnew array<MimeTextMatch^>(5);
myMimeTextMatchCollection1 = myMimeTextBinding1->Matches;
for ( myInt = 0; myInt < 4; myInt++ )
{
myMimeTextMatch1[ myInt ] = gcnew MimeTextMatch;
myMimeTextMatch1[ myInt ]->Name = String::Format( "Title{0}", Convert::ToString( myInt ) );
if ( myInt != 0 )
{
myMimeTextMatch1[ myInt ]->RepeatsString = "7";
}
myMimeTextMatchCollection1->Add( myMimeTextMatch1[ myInt ] );
}
myMimeTextMatch1[ 4 ] = gcnew MimeTextMatch;
// Remove 'MimeTextMatch' instance from collection.
myMimeTextMatchCollection1->Remove( myMimeTextMatch1[ 1 ] );
// Using MimeTextMatchCollection.Item indexer to comapre.
if ( myMimeTextMatch1[ 2 ] == myMimeTextMatchCollection1[ 1 ] )
{
// Check whether 'MimeTextMatch' instance exists.
myInt = myMimeTextMatchCollection1->IndexOf( myMimeTextMatch1[ 2 ] );
// Insert 'MimeTextMatch' instance at a desired position.
myMimeTextMatchCollection1->Insert( 1, myMimeTextMatch1[ myInt ] );
myMimeTextMatchCollection1[ 1 ]->RepeatsString = "5";
myMimeTextMatchCollection1->Insert( 4, myMimeTextMatch1[ myInt ] );
}
// Create the 'InputBinding' object.
InputBinding myInputBinding = new InputBinding();
MimeTextBinding myMimeTextBinding = new MimeTextBinding();
MimeTextMatchCollection myMimeTextMatchCollection;
// Get an array instance of 'MimeTextMatch' class.
MimeTextMatch[] myMimeTextMatch = new MimeTextMatch[4];
myMimeTextMatchCollection = myMimeTextBinding.Matches;
// Initialize properties of 'MimeTextMatch' class.
for( myInt = 0 ; myInt < 4 ; myInt++ )
{
// Create the 'MimeTextMatch' instance.
myMimeTextMatch[ myInt ] = new MimeTextMatch();
myMimeTextMatch[ myInt ].Name = "Title";
myMimeTextMatch[ myInt ].Type = "*/*";
myMimeTextMatch[ myInt ].IgnoreCase = true;
if( true == myMimeTextMatchCollection.Contains( myMimeTextMatch[ 0 ] ) )
{
myMimeTextMatch[ myInt ].Name = "Title" + Convert.ToString( myInt );
myMimeTextMatch[ myInt ].Capture = 2;
myMimeTextMatch[ myInt ].Group = 2;
myMimeTextMatchCollection.Add( myMimeTextMatch[ myInt ] );
}
else
{
myMimeTextMatchCollection.Add( myMimeTextMatch[ myInt ] );
myMimeTextMatchCollection[ myInt ].RepeatsString = "2";
}
}
myMimeTextMatchCollection = myMimeTextBinding.Matches;
// Copy collection to 'MimeTextMatch' array instance.
myMimeTextMatchCollection.CopyTo( myMimeTextMatch, 0 );
myInputBinding.Extensions.Add(myMimeTextBinding);
// Add the 'InputBinding' to 'OperationBinding'.
myOperationBinding.Input = myInputBinding;
// Create the 'OutputBinding' instance.
OutputBinding myOutputBinding = new OutputBinding();
// Create the 'MimeTextBinding' instance.
MimeTextBinding myMimeTextBinding1 = new MimeTextBinding();
// Get an instance of 'MimeTextMatchCollection'.
MimeTextMatchCollection myMimeTextMatchCollection1 = new MimeTextMatchCollection();
MimeTextMatch[] myMimeTextMatch1 = new MimeTextMatch[5];
myMimeTextMatchCollection1 = myMimeTextBinding1.Matches;
for( myInt = 0 ; myInt < 4 ; myInt++ )
{
myMimeTextMatch1[ myInt ] = new MimeTextMatch();
myMimeTextMatch1[ myInt ].Name = "Title" + Convert.ToString( myInt );
if( myInt != 0 )
{
myMimeTextMatch1[ myInt ].RepeatsString = "7";
}
myMimeTextMatchCollection1.Add( myMimeTextMatch1[ myInt ] );
}
myMimeTextMatch1[4] = new MimeTextMatch();
// Remove 'MimeTextMatch' instance from collection.
myMimeTextMatchCollection1.Remove( myMimeTextMatch1[ 1 ] );
// Using MimeTextMatchCollection.Item indexer to comapre.
if( myMimeTextMatch1[ 2 ] == myMimeTextMatchCollection1[ 1 ] )
{
// Check whether 'MimeTextMatch' instance exists.
myInt = myMimeTextMatchCollection1.IndexOf( myMimeTextMatch1[ 2 ] );
// Insert 'MimeTextMatch' instance at a desired position.
myMimeTextMatchCollection1.Insert( 1, myMimeTextMatch1[ myInt ] );
myMimeTextMatchCollection1[ 1 ].RepeatsString = "5";
myMimeTextMatchCollection1.Insert( 4, myMimeTextMatch1[ myInt ] );
}
' Create the 'InputBinding' object.
Dim myInputBinding As New InputBinding()
Dim myMimeTextBinding As New MimeTextBinding()
Dim myMimeTextMatchCollection As MimeTextMatchCollection
' Get an array instance of 'MimeTextMatch' class.
Dim myMimeTextMatch(3) As MimeTextMatch
myMimeTextMatchCollection = myMimeTextBinding.Matches
' Initialize properties of 'MimeTextMatch' class.
For myInt = 0 To 3
' Create the 'MimeTextMatch' instance.
myMimeTextMatch(myInt) = New MimeTextMatch()
myMimeTextMatch(myInt).Name = "Title"
myMimeTextMatch(myInt).Type = "*/*"
myMimeTextMatch(myInt).IgnoreCase = True
If True = myMimeTextMatchCollection.Contains(myMimeTextMatch(0)) Then
myMimeTextMatch(myInt).Name = "Title" + Convert.ToString(myInt)
myMimeTextMatch(myInt).Capture = 2
myMimeTextMatch(myInt).Group = 2
myMimeTextMatchCollection.Add(myMimeTextMatch(myInt))
Else
myMimeTextMatchCollection.Add(myMimeTextMatch(myInt))
myMimeTextMatchCollection(myInt).RepeatsString = "2"
End If
Next myInt
myMimeTextMatchCollection = myMimeTextBinding.Matches
' Copy collection to 'MimeTextMatch' array instance.
myMimeTextMatchCollection.CopyTo(myMimeTextMatch, 0)
myInputBinding.Extensions.Add(myMimeTextBinding)
' Add the 'InputBinding' to 'OperationBinding'.
myOperationBinding.Input = myInputBinding
' Create the 'OutputBinding' instance.
Dim myOutputBinding As New OutputBinding()
' Create the 'MimeTextBinding' instance.
Dim myMimeTextBinding1 As New MimeTextBinding()
' Get an instance of 'MimeTextMatchCollection'.
Dim myMimeTextMatchCollection1 As New MimeTextMatchCollection()
Dim myMimeTextMatch1(4) As MimeTextMatch
myMimeTextMatchCollection1 = myMimeTextBinding1.Matches
For myInt = 0 To 3
myMimeTextMatch1(myInt) = New MimeTextMatch()
myMimeTextMatch1(myInt).Name = "Title" + Convert.ToString(myInt)
If myInt <> 0 Then
myMimeTextMatch1(myInt).RepeatsString = "7"
End If
myMimeTextMatchCollection1.Add(myMimeTextMatch1(myInt))
Next myInt
myMimeTextMatch1(4) = New MimeTextMatch()
' Remove 'MimeTextMatch' instance from collection.
myMimeTextMatchCollection1.Remove(myMimeTextMatch1(1))
' Using MimeTextMatchCollection.Item indexer to comapre.
If myMimeTextMatch1(2) Is myMimeTextMatchCollection1(1) Then
' Check whether 'MimeTextMatch' instance exists.
myInt = myMimeTextMatchCollection1.IndexOf(myMimeTextMatch1(2))
' Insert 'MimeTextMatch' instance at a desired position.
myMimeTextMatchCollection1.Insert(1, myMimeTextMatch1(myInt))
myMimeTextMatchCollection1(1).RepeatsString = "5"
myMimeTextMatchCollection1.Insert(4, myMimeTextMatch1(myInt))
End If
注釈
は MimeTextMatch 、HTTP 転送を検索する MIME テキスト パターンを表します。 XML Web サービスのプロトコルの指定の詳細については、「ASP.NET を使用した XML Web サービス」を参照してください。 Web サービス記述言語 (WSDL) の詳細については、 WSDL 仕様を参照してください。
コンストラクター
MimeTextMatchCollection() |
MimeTextMatchCollection クラスの新しいインスタンスを初期化します。 |
プロパティ
Capacity |
CollectionBase に格納できる要素の数を取得または設定します。 (継承元 CollectionBase) |
Count |
CollectionBase インスタンスに含まれる要素の数を取得します。 このプロパティはオーバーライドできません。 (継承元 CollectionBase) |
InnerList |
ArrayList インスタンス内の要素のリストを格納する CollectionBase を取得します。 (継承元 CollectionBase) |
Item[Int32] |
指定した 0 から始まるインデックス番号に対応する MimeTextMatchCollection のメンバーの値を取得または設定します。 |
List |
IList インスタンス内の要素のリストを格納する CollectionBase を取得します。 (継承元 CollectionBase) |
メソッド
明示的なインターフェイスの実装
拡張メソッド
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。 |
OfType<TResult>(IEnumerable) |
指定された型に基づいて IEnumerable の要素をフィルター処理します。 |
AsParallel(IEnumerable) |
クエリの並列化を有効にします。 |
AsQueryable(IEnumerable) |
IEnumerable を IQueryable に変換します。 |
適用対象
.NET