Compartir vía


ServiceDescriptionFormatExtensionCollection.FindAll Método

Definición

Busca en ServiceDescriptionFormatExtensionCollection todos los miembros de la colección especificados por el parámetro pasado.

Sobrecargas

FindAll(Type)

Busca ServiceDescriptionFormatExtensionCollection y devuelve una matriz de todos los elementos del Type especificado.

FindAll(String, String)

Busca ServiceDescriptionFormatExtensionCollection y devuelve una matriz de todos los miembros con el nombre y el identificador URI del espacio de nombres especificados.

FindAll(Type)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

Busca ServiceDescriptionFormatExtensionCollection y devuelve una matriz de todos los elementos del Type especificado.

public:
 cli::array <System::Object ^> ^ FindAll(Type ^ type);
public object[] FindAll (Type type);
member this.FindAll : Type -> obj[]
Public Function FindAll (type As Type) As Object()

Parámetros

type
Type

Type que se va a buscar en la colección.

Devoluciones

Object[]

Matriz de instancias de Object que representa todos los miembros de la colección del tipo especificado.

Ejemplos

// Check all elements of type 'SoapBinding' in collection.
array<Object^>^myObjectArray1 = gcnew array<Object^>(myCollection->Count);
myObjectArray1 = myCollection->FindAll( mySoapBinding1->GetType() );
int myNumberOfElements = 0;
IEnumerator^ myIEnumerator = myObjectArray1->GetEnumerator();

// Calculate number of elements of type 'SoapBinding'.
while ( myIEnumerator->MoveNext() )
      if ( mySoapBinding1->GetType() == myIEnumerator->Current->GetType() )
      myNumberOfElements++;
Console::WriteLine( "Collection contains {0} objects of type ' {1}'.", myNumberOfElements, mySoapBinding1->GetType() );
// Check all elements of type 'SoapBinding' in collection.
Object[] myObjectArray1 = new Object[myCollection.Count];
myObjectArray1 = myCollection.FindAll(mySoapBinding1.GetType());
int myNumberOfElements = 0;
IEnumerator myIEnumerator  = myObjectArray1.GetEnumerator();

// Calculate number of elements of type 'SoapBinding'.
while(myIEnumerator.MoveNext())
{
   if(mySoapBinding1.GetType() == myIEnumerator.Current.GetType())
      myNumberOfElements++;
}
Console.WriteLine("Collection contains {0} objects of type '{1}'.",
                  myNumberOfElements.ToString(),
                  mySoapBinding1.GetType().ToString());
' Check all elements of type 'SoapBinding' in collection.
Dim myObjectArray1(myCollection.Count -1 ) As Object
myObjectArray1 = myCollection.FindAll(mySoapBinding1.GetType())
Dim myNumberOfElements As Integer = 0
Dim myIEnumerator As IEnumerator = myObjectArray1.GetEnumerator()

' Calculate number of elements of type 'SoapBinding'.
While myIEnumerator.MoveNext()
   If mySoapBinding1.GetType() Is  myIEnumerator.Current.GetType() Then
      myNumberOfElements += 1
   End If
End While
Console.WriteLine("Collection contains {0} objects of type '{1}'.", _
        myNumberOfElements.ToString(), mySoapBinding1.GetType().ToString())

Comentarios

Nota

La matriz devuelta está vacía si la búsqueda no se realiza correctamente.

Se aplica a

FindAll(String, String)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

Busca ServiceDescriptionFormatExtensionCollection y devuelve una matriz de todos los miembros con el nombre y el identificador URI del espacio de nombres especificados.

public:
 cli::array <System::Xml::XmlElement ^> ^ FindAll(System::String ^ name, System::String ^ ns);
public System.Xml.XmlElement[] FindAll (string name, string ns);
member this.FindAll : string * string -> System.Xml.XmlElement[]
Public Function FindAll (name As String, ns As String) As XmlElement()

Parámetros

name
String

Atributo de nombre XML de los objetos XmlElement que se van a buscar.

ns
String

Atributo URI del espacio de nombres XML de los objetos XmlElement que se van a buscar.

Devoluciones

Matriz de instancias de XmlElement.

Comentarios

Nota

La matriz devuelta está vacía si la búsqueda no se realiza correctamente.

Se aplica a