ServiceDescriptionFormatExtensionCollection.FindAll Método

Definição

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

Sobrecargas

Name Description
FindAll(Type)

Pesquisa no ServiceDescriptionFormatExtensionCollection e retorna um array de todos os elementos do especificado Type.

FindAll(String, String)

Pesquisa no ServiceDescriptionFormatExtensionCollection e devolve um array de todos os membros com o nome e espaço de nomes especificados URI.

FindAll(Type)

Pesquisa no ServiceDescriptionFormatExtensionCollection e retorna um array de todos os elementos do especificado Type.

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

A Type para pesquisar na coleção.

Devoluções

Object[]

Um array de Object instâncias 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())

Observações

Note

O array devolvido fica vazio se a pesquisa não for bem-sucedida.

Aplica-se a

FindAll(String, String)

Pesquisa no ServiceDescriptionFormatExtensionCollection e devolve um array de todos os membros com o nome e espaço de nomes especificados URI.

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 do nome XML dos XmlElement objetos a encontrar.

ns
String

O atributo URI do espaço de nomes XML dos XmlElement objetos a encontrar.

Devoluções

Uma variedade de XmlElement instâncias.

Observações

Note

O array devolvido fica vazio se a pesquisa não for bem-sucedida.

Aplica-se a