MimeTextMatchCollection Klas

Definitie

Biedt een verzameling exemplaren van de MimeTextMatch klasse. Deze klasse kan niet worden overgenomen.

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
Overname
MimeTextMatchCollection

Voorbeelden

In het volgende voorbeeld ziet u het gebruik van de eigenschappen en methoden die door de MimeTextMatchCollection klasse worden weergegeven.

// 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

Opmerkingen

A MimeTextMatch vertegenwoordigt een MIME-tekstpatroon waarvoor een HTTP-overdracht wordt doorzocht. Zie XML-webservices met ASP.NET voor meer informatie over het opgeven van protocollen voor XML-webservices. Zie de WSDL-specificatie voor meer informatie over WSDL (Web Services Description Language).

Constructors

Name Description
MimeTextMatchCollection()

Initialiseert een nieuw exemplaar van de MimeTextMatchCollection klasse.

Eigenschappen

Name Description
Capacity

Hiermee haalt u het aantal elementen op of CollectionBase stelt u dit in.

(Overgenomen van CollectionBase)
Count

Hiermee haalt u het aantal elementen op dat in het CollectionBase exemplaar is opgenomen. Deze eigenschap kan niet worden overschreven.

(Overgenomen van CollectionBase)
InnerList

Hiermee haalt u een ArrayList met de lijst met elementen in het CollectionBase exemplaar op.

(Overgenomen van CollectionBase)
Item[Int32]

Hiermee wordt de waarde van het lid van de MimeTextMatchCollection opgegeven op nul gebaseerde index opgehaald of ingesteld.

List

Hiermee haalt u een IList met de lijst met elementen in het CollectionBase exemplaar op.

(Overgenomen van CollectionBase)

Methoden

Name Description
Add(MimeTextMatch)

Hiermee voegt u de opgegeven MimeTextMatch waarde toe aan het einde van de MimeTextMatchCollection.

Clear()

Hiermee verwijdert u alle objecten uit het CollectionBase exemplaar. Deze methode kan niet worden overschreven.

(Overgenomen van CollectionBase)
Contains(MimeTextMatch)

Retourneert een waarde die aangeeft of de opgegeven MimeTextMatch lid is van de MimeTextMatchCollection.

CopyTo(MimeTextMatch[], Int32)

Kopieert het hele MimeTextMatchCollection naar een compatibele eendimensionale matrix van het type MimeTextMatch, beginnend bij de opgegeven op nul gebaseerde index van de doelmatrix.

Equals(Object)

Bepaalt of het opgegeven object gelijk is aan het huidige object.

(Overgenomen van Object)
GetEnumerator()

Retourneert een enumerator die door het CollectionBase exemplaar wordt herhaald.

(Overgenomen van CollectionBase)
GetHashCode()

Fungeert als de standaardhashfunctie.

(Overgenomen van Object)
GetType()

Hiermee haalt u de Type huidige instantie op.

(Overgenomen van Object)
IndexOf(MimeTextMatch)

Zoekt naar de opgegeven MimeTextMatch en retourneert de op nul gebaseerde index van het eerste exemplaar in de verzameling.

Insert(Int32, MimeTextMatch)

Hiermee voegt u de opgegeven waarde toe aan de MimeTextMatchCollection opgegeven MimeTextMatch index.

MemberwiseClone()

Hiermee maakt u een ondiepe kopie van de huidige Object.

(Overgenomen van Object)
OnClear()

Voert extra aangepaste processen uit bij het wissen van de inhoud van het CollectionBase exemplaar.

(Overgenomen van CollectionBase)
OnClearComplete()

Voert extra aangepaste processen uit nadat de inhoud van het CollectionBase exemplaar is gewist.

(Overgenomen van CollectionBase)
OnInsert(Int32, Object)

Voert aanvullende aangepaste processen uit voordat u een nieuw element in het CollectionBase exemplaar invoegt.

(Overgenomen van CollectionBase)
OnInsertComplete(Int32, Object)

Voert extra aangepaste processen uit na het invoegen van een nieuw element in het CollectionBase exemplaar.

(Overgenomen van CollectionBase)
OnRemove(Int32, Object)

Voert extra aangepaste processen uit bij het verwijderen van een element uit het CollectionBase exemplaar.

(Overgenomen van CollectionBase)
OnRemoveComplete(Int32, Object)

Voert extra aangepaste processen uit nadat u een element uit het CollectionBase exemplaar hebt verwijderd.

(Overgenomen van CollectionBase)
OnSet(Int32, Object, Object)

Voert extra aangepaste processen uit voordat u een waarde instelt in het CollectionBase exemplaar.

(Overgenomen van CollectionBase)
OnSetComplete(Int32, Object, Object)

Voert extra aangepaste processen uit na het instellen van een waarde in het CollectionBase exemplaar.

(Overgenomen van CollectionBase)
OnValidate(Object)

Voert extra aangepaste processen uit bij het valideren van een waarde.

(Overgenomen van CollectionBase)
Remove(MimeTextMatch)

Hiermee verwijdert u het eerste exemplaar van de opgegeven MimeTextMatch instantie uit de MimeTextMatchCollection.

RemoveAt(Int32)

Hiermee verwijdert u het element in de opgegeven index van het CollectionBase exemplaar. Deze methode kan niet worden overschreven.

(Overgenomen van CollectionBase)
ToString()

Retourneert een tekenreeks die het huidige object vertegenwoordigt.

(Overgenomen van Object)

Expliciete interface-implementaties

Name Description
ICollection.CopyTo(Array, Int32)

Kopieert het hele CollectionBase naar een compatibele eendimensionale Arraywaarde, beginnend bij de opgegeven index van de doelmatrix.

(Overgenomen van CollectionBase)
ICollection.IsSynchronized

Hiermee wordt een waarde opgehaald die aangeeft of de toegang tot de CollectionBase synchronisatie is gesynchroniseerd (thread safe).

(Overgenomen van CollectionBase)
ICollection.SyncRoot

Hiermee haalt u een object op dat kan worden gebruikt om de toegang tot het CollectionBaseobject te synchroniseren.

(Overgenomen van CollectionBase)
IList.Add(Object)

Hiermee voegt u een object toe aan het einde van de CollectionBase.

(Overgenomen van CollectionBase)
IList.Contains(Object)

Bepaalt of het CollectionBase een specifiek element bevat.

(Overgenomen van CollectionBase)
IList.IndexOf(Object)

Zoekt naar de opgegeven Object en retourneert de op nul gebaseerde index van het eerste exemplaar binnen het hele CollectionBaseexemplaar.

(Overgenomen van CollectionBase)
IList.Insert(Int32, Object)

Hiermee voegt u een element in de CollectionBase opgegeven index in.

(Overgenomen van CollectionBase)
IList.IsFixedSize

Hiermee wordt een waarde opgehaald die aangeeft of de grootte van een CollectionBase vaste grootte is.

(Overgenomen van CollectionBase)
IList.IsReadOnly

Hiermee wordt een waarde opgehaald die aangeeft of het CollectionBase kenmerk Alleen-lezen is.

(Overgenomen van CollectionBase)
IList.Item[Int32]

Hiermee haalt u het element op de opgegeven index op of stelt u het in.

(Overgenomen van CollectionBase)
IList.Remove(Object)

Hiermee verwijdert u het eerste exemplaar van een specifiek object uit de CollectionBase.

(Overgenomen van CollectionBase)

Extensiemethoden

Name Description
AsParallel(IEnumerable)

Hiermee schakelt u parallelle uitvoering van een query in.

AsQueryable(IEnumerable)

Converteert een IEnumerable naar een IQueryable.

Cast<TResult>(IEnumerable)

Cast de elementen van een IEnumerable naar het opgegeven type.

OfType<TResult>(IEnumerable)

Hiermee filtert u de elementen van een IEnumerable op basis van een opgegeven type.

Van toepassing op