MimeTextMatchCollection Klasse
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Stellt eine Auflistung von Instanzen der MimeTextMatch Klasse bereit. Diese Klasse kann nicht vererbt werden.
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
- Vererbung
Beispiele
Im folgenden Beispiel wird die Verwendung der Von der MimeTextMatchCollection Klasse verfügbar gemachten Eigenschaften und Methoden veranschaulicht.
// 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
Hinweise
A MimeTextMatch stellt ein MIME-Textmuster dar, nach dem eine HTTP-Übertragung durchsucht wird. Weitere Informationen zum Angeben von Protokollen für XML-Webdienste finden Sie unter XML Web Services Using ASP.NET. Weitere Informationen zur Beschreibungssprache für Webdienste (WSDL) finden Sie in der WSDL-Spezifikation .
Konstruktoren
| Name | Beschreibung |
|---|---|
| MimeTextMatchCollection() |
Initialisiert eine neue Instanz der MimeTextMatchCollection-Klasse. |
Eigenschaften
| Name | Beschreibung |
|---|---|
| Capacity |
Ruft die Anzahl der Elemente ab, die dies enthalten kann, oder legt diese CollectionBase fest. (Geerbt von CollectionBase) |
| Count |
Ruft die Anzahl der In der CollectionBase Instanz enthaltenen Elemente ab. Diese Eigenschaft kann nicht außer Kraft gesetzt werden. (Geerbt von CollectionBase) |
| InnerList |
Ruft eine ArrayList liste der Elemente in der CollectionBase Instanz ab. (Geerbt von CollectionBase) |
| Item[Int32] |
Dient zum Abrufen oder Festlegen des Werts des Elements des MimeTextMatchCollection am angegebenen nullbasierten Index. |
| List |
Ruft eine IList liste der Elemente in der CollectionBase Instanz ab. (Geerbt von CollectionBase) |
Methoden
| Name | Beschreibung |
|---|---|
| Add(MimeTextMatch) |
Fügt das angegebene MimeTextMatch Ende der .MimeTextMatchCollection |
| Clear() |
Entfernt alle Objekte aus der CollectionBase Instanz. Diese Methode kann nicht überschrieben werden. (Geerbt von CollectionBase) |
| Contains(MimeTextMatch) |
Gibt einen Wert zurück, der angibt, ob es sich bei dem angegebenen MimeTextMatch Element um ein Element der MimeTextMatchCollection. |
| CopyTo(MimeTextMatch[], Int32) |
Kopiert das Gesamte MimeTextMatchCollection in ein kompatibles eindimensionales Array vom Typ MimeTextMatch, beginnend mit dem angegebenen nullbasierten Index des Zielarrays. |
| Equals(Object) |
Bestimmt, ob das angegebene Objekt gleich dem aktuellen Objekt ist. (Geerbt von Object) |
| GetEnumerator() |
Gibt einen Enumerator zurück, der die CollectionBase Instanz durchläuft. (Geerbt von CollectionBase) |
| GetHashCode() |
Dient als Standardhashfunktion. (Geerbt von Object) |
| GetType() |
Ruft die Type der aktuellen Instanz ab. (Geerbt von Object) |
| IndexOf(MimeTextMatch) |
Sucht nach dem angegebenen Und MimeTextMatch gibt den nullbasierten Index des ersten Vorkommens innerhalb der Auflistung zurück. |
| Insert(Int32, MimeTextMatch) |
Fügt den angegebenen MimeTextMatch Index dem MimeTextMatchCollection angegebenen Index hinzu. |
| MemberwiseClone() |
Erstellt eine flache Kopie der aktuellen Object. (Geerbt von Object) |
| OnClear() |
Führt zusätzliche benutzerdefinierte Prozesse aus, wenn der Inhalt der CollectionBase Instanz gelöscht wird. (Geerbt von CollectionBase) |
| OnClearComplete() |
Führt zusätzliche benutzerdefinierte Prozesse aus, nachdem der Inhalt der CollectionBase Instanz gelöscht wurde. (Geerbt von CollectionBase) |
| OnInsert(Int32, Object) |
Führt zusätzliche benutzerdefinierte Prozesse aus, bevor ein neues Element in die CollectionBase Instanz eingefügt wird. (Geerbt von CollectionBase) |
| OnInsertComplete(Int32, Object) |
Führt zusätzliche benutzerdefinierte Prozesse aus, nachdem ein neues Element in die CollectionBase Instanz eingefügt wurde. (Geerbt von CollectionBase) |
| OnRemove(Int32, Object) |
Führt zusätzliche benutzerdefinierte Prozesse aus, wenn ein Element aus der CollectionBase Instanz entfernt wird. (Geerbt von CollectionBase) |
| OnRemoveComplete(Int32, Object) |
Führt zusätzliche benutzerdefinierte Prozesse aus, nachdem ein Element aus der CollectionBase Instanz entfernt wurde. (Geerbt von CollectionBase) |
| OnSet(Int32, Object, Object) |
Führt zusätzliche benutzerdefinierte Prozesse aus, bevor ein Wert in der CollectionBase Instanz festgelegt wird. (Geerbt von CollectionBase) |
| OnSetComplete(Int32, Object, Object) |
Führt nach dem Festlegen eines Werts in der CollectionBase Instanz weitere benutzerdefinierte Prozesse aus. (Geerbt von CollectionBase) |
| OnValidate(Object) |
Führt beim Überprüfen eines Werts zusätzliche benutzerdefinierte Prozesse aus. (Geerbt von CollectionBase) |
| Remove(MimeTextMatch) |
Entfernt das erste Vorkommen des angegebenen MimeTextMatch Aus.MimeTextMatchCollection |
| RemoveAt(Int32) |
Entfernt das Element am angegebenen Index der CollectionBase Instanz. Diese Methode kann nicht außer Kraft gesetzt werden. (Geerbt von CollectionBase) |
| ToString() |
Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt. (Geerbt von Object) |
Explizite Schnittstellenimplementierungen
| Name | Beschreibung |
|---|---|
| ICollection.CopyTo(Array, Int32) |
Kopiert das Gesamte CollectionBase in einen kompatiblen eindimensionalen Array, beginnend am angegebenen Index des Zielarrays. (Geerbt von CollectionBase) |
| ICollection.IsSynchronized |
Ruft einen Wert ab, der angibt, ob der Zugriff auf die CollectionBase synchronisiert wird (Threadsicher). (Geerbt von CollectionBase) |
| ICollection.SyncRoot |
Ruft ein Objekt ab, das zum Synchronisieren des Zugriffs auf die CollectionBaseverwendet werden kann. (Geerbt von CollectionBase) |
| IList.Add(Object) |
Fügt ein Objekt am Ende der .CollectionBase (Geerbt von CollectionBase) |
| IList.Contains(Object) |
Bestimmt, ob das CollectionBase Element ein bestimmtes Element enthält. (Geerbt von CollectionBase) |
| IList.IndexOf(Object) |
Sucht nach dem angegebenen Object Und gibt den nullbasierten Index des ersten Vorkommens innerhalb des gesamten CollectionBasezurück. (Geerbt von CollectionBase) |
| IList.Insert(Int32, Object) |
Fügt ein Element in den CollectionBase angegebenen Index ein. (Geerbt von CollectionBase) |
| IList.IsFixedSize |
Ruft einen Wert ab, der angibt, ob die CollectionBase Größe fest ist. (Geerbt von CollectionBase) |
| IList.IsReadOnly |
Ruft einen Wert ab, der angibt, ob die CollectionBase schreibgeschützt ist. (Geerbt von CollectionBase) |
| IList.Item[Int32] |
Ruft das Element am angegebenen Index ab oder legt es fest. (Geerbt von CollectionBase) |
| IList.Remove(Object) |
Entfernt das erste Vorkommen eines bestimmten Objekts aus dem CollectionBase. (Geerbt von CollectionBase) |
Erweiterungsmethoden
| Name | Beschreibung |
|---|---|
| AsParallel(IEnumerable) |
Aktiviert die Parallelisierung einer Abfrage. |
| AsQueryable(IEnumerable) |
Wandelt eine IEnumerable in eine IQueryableum. |
| Cast<TResult>(IEnumerable) |
Wandelt die Elemente eines IEnumerable in den angegebenen Typ um. |
| OfType<TResult>(IEnumerable) |
Filtert die Elemente einer IEnumerable basierend auf einem angegebenen Typ. |