MimeTextMatchCollection Class
Provides a collection of instances of the MimeTextMatch class. This class cannot be inherited.
Assembly: System.Web.Services (in System.Web.Services.dll)
System.Collections.CollectionBase
System.Web.Services.Description.MimeTextMatchCollection
| Name | Description | |
|---|---|---|
![]() | MimeTextMatchCollection() | Initializes a new instance of the MimeTextMatchCollection class. |
| Name | Description | |
|---|---|---|
![]() | Capacity | Gets or sets the number of elements that the CollectionBase can contain.(Inherited from CollectionBase.) |
![]() | Count | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.(Inherited from CollectionBase.) |
![]() | Item[Int32] | Gets or sets the value of the member of the MimeTextMatchCollection at the specified zero-based index. |
| Name | Description | |
|---|---|---|
![]() | Add(MimeTextMatch) | Adds the specified MimeTextMatch to the end of the MimeTextMatchCollection. |
![]() | Clear() | Removes all objects from the CollectionBase instance. This method cannot be overridden.(Inherited from CollectionBase.) |
![]() | Contains(MimeTextMatch) | Returns a value indicating whether the specified MimeTextMatch is a member of the MimeTextMatchCollection. |
![]() | CopyTo(MimeTextMatch[], Int32) | Copies the entire MimeTextMatchCollection to a compatible one-dimensional array of type MimeTextMatch, starting at the specified zero-based index of the target array. |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetEnumerator() | Returns an enumerator that iterates through the CollectionBase instance.(Inherited from CollectionBase.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | IndexOf(MimeTextMatch) | Searches for the specified MimeTextMatch and returns the zero-based index of the first occurrence within the collection. |
![]() | Insert(Int32, MimeTextMatch) | Adds the specified MimeTextMatch to the MimeTextMatchCollection at the specified index. |
![]() | Remove(MimeTextMatch) | Removes the first occurrence of the specified MimeTextMatch from the MimeTextMatchCollection. |
![]() | RemoveAt(Int32) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.(Inherited from CollectionBase.) |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ICollection.CopyTo(Array, Int32) | Copies the entire CollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.(Inherited from CollectionBase.) |
![]() ![]() | IList.Add(Object) | Adds an object to the end of the CollectionBase.(Inherited from CollectionBase.) |
![]() ![]() | IList.Contains(Object) | Determines whether the CollectionBase contains a specific element.(Inherited from CollectionBase.) |
![]() ![]() | IList.IndexOf(Object) | Searches for the specified Object and returns the zero-based index of the first occurrence within the entire CollectionBase.(Inherited from CollectionBase.) |
![]() ![]() | IList.Insert(Int32, Object) | Inserts an element into the CollectionBase at the specified index.(Inherited from CollectionBase.) |
![]() ![]() | IList.Remove(Object) | Removes the first occurrence of a specific object from the CollectionBase.(Inherited from CollectionBase.) |
![]() ![]() | ICollection.IsSynchronized | Gets a value indicating whether access to the CollectionBase is synchronized (thread safe).(Inherited from CollectionBase.) |
![]() ![]() | ICollection.SyncRoot | Gets an object that can be used to synchronize access to the CollectionBase.(Inherited from CollectionBase.) |
![]() ![]() | IList.IsFixedSize | Gets a value indicating whether the CollectionBase has a fixed size.(Inherited from CollectionBase.) |
![]() ![]() | IList.IsReadOnly | Gets a value indicating whether the CollectionBase is read-only.(Inherited from CollectionBase.) |
![]() ![]() | IList.Item[Int32] | Gets or sets the element at the specified index.(Inherited from CollectionBase.) |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast<TResult>() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType<TResult>() | Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.) |
A MimeTextMatch represents a MIME text pattern for which an HTTP transmission will be searched. For more information about specifying protocols for XML Web services, see [<topic://cpconbuildingaspnetwebservices>]. For more information about Web Services Description Language (WSDL), see the specification at http://www.w3.org/TR/wsdl/.
The following example demonstrates the use of the properties and methods exposed by the MimeTextMatchCollection class.
// 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 ] ); }
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




