ServiceDescriptionFormatExtensionCollection.FindAll Metoda

Definicja

Wyszukuje ServiceDescriptionFormatExtensionCollection wszystkie elementy członkowskie kolekcji określone przez przekazany parametr.

Przeciążenia

FindAll(Type)

Wyszukuje ServiceDescriptionFormatExtensionCollection obiekt i zwraca tablicę wszystkich elementów określonego Typeelementu .

FindAll(String, String)

Wyszukuje ServiceDescriptionFormatExtensionCollection i zwraca tablicę wszystkich elementów członkowskich o określonej nazwie i identyfikatorze URI przestrzeni nazw.

FindAll(Type)

Wyszukuje ServiceDescriptionFormatExtensionCollection obiekt i zwraca tablicę wszystkich elementów określonego Typeelementu .

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

Parametry

type
Type

Element Type , dla którego ma być wyszukiwana kolekcja.

Zwraca

Object[]

Tablica wystąpień Object reprezentujących wszystkie elementy członkowskie kolekcji określonego typu.

Przykłady

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

Uwagi

Uwaga

Zwrócona tablica jest pusta, jeśli wyszukiwanie nie powiedzie się.

Dotyczy

FindAll(String, String)

Wyszukuje ServiceDescriptionFormatExtensionCollection i zwraca tablicę wszystkich elementów członkowskich o określonej nazwie i identyfikatorze URI przestrzeni nazw.

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

Parametry

name
String

Atrybut XmlElement nazwy XML obiektów do znalezienia.

ns
String

Atrybut URI przestrzeni nazw XML obiektów XmlElement , które mają zostać znalezione.

Zwraca

XmlElement[]

Tablica XmlElement wystąpień.

Uwagi

Uwaga

Zwrócona tablica jest pusta, jeśli wyszukiwanie nie powiedzie się.

Dotyczy