Compartilhar via


ServiceDescriptionFormatExtensionCollection.FindAll Método

Definição

Pesquisa o ServiceDescriptionFormatExtensionCollection por todos os membros da coleção especificada pelo parâmetro passado.

Sobrecargas

FindAll(Type)

Pesquisa o ServiceDescriptionFormatExtensionCollection e retorna uma matriz de todos os elementos do Type especificado.

FindAll(String, String)

Pesquisa o ServiceDescriptionFormatExtensionCollection e retorna uma matriz de todos os membros com o nome e o URI de namespace especificados.

FindAll(Type)

Pesquisa o ServiceDescriptionFormatExtensionCollection e retorna uma matriz de todos os elementos do 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

Um Type no qual pesquisar a coleção.

Retornos

Object[]

Uma matriz de instâncias de Object que representa todos os membros da coleção do tipo especificado.

Exemplos

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

Comentários

Observação

A matriz retornada estará vazia se a pesquisa não tiver êxito.

Aplica-se a

FindAll(String, String)

Pesquisa o ServiceDescriptionFormatExtensionCollection e retorna uma matriz de todos os membros com o nome e o URI de namespace 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

O atributo de nome de XML dos objetos XmlElement a serem localizados.

ns
String

O atributo de URI do namespace de XML dos objetos XmlElement a serem localizados.

Retornos

XmlElement[]

Uma matriz de instâncias XmlElement.

Comentários

Observação

A matriz retornada estará vazia se a pesquisa não tiver êxito.

Aplica-se a