Επεξεργασία

Κοινή χρήση μέσω


Evidence.GetAssemblyEnumerator Method

Definition

Enumerates evidence provided by the assembly.

public:
 System::Collections::IEnumerator ^ GetAssemblyEnumerator();
public System.Collections.IEnumerator GetAssemblyEnumerator ();
member this.GetAssemblyEnumerator : unit -> System.Collections.IEnumerator
Public Function GetAssemblyEnumerator () As IEnumerator

Returns

An enumerator for evidence added by the AddAssembly(Object) method.

Examples

The following example shows the use of the GetAssemblyEnumerator method. This example is part of a larger example provided for the Evidence class.

array<Object^>^oa1 = {};
Site^ site = gcnew Site( "www.wideworldimporters.com" );
array<Object^>^oa2 = {url,site};
Evidence^ ev3a = gcnew Evidence( oa1,oa2 );
enum1 = ev3a->GetHostEnumerator();
IEnumerator^ enum2 = ev3a->GetAssemblyEnumerator();
enum2->MoveNext();
Object^ obj1 = enum2->Current;
enum2->MoveNext();
Console::WriteLine( "URL = {0}  Site = {1}", obj1, enum2->Current );
Object [] oa1 = {};
Site site = new Site("www.wideworldimporters.com");
Object [] oa2 = { url, site };
Evidence ev3a = new Evidence(oa1, oa2);
enum1 = ev3a.GetHostEnumerator();
IEnumerator enum2 = ev3a.GetAssemblyEnumerator();
enum2.MoveNext();
Object obj1 = enum2.Current;
enum2.MoveNext();
Console.WriteLine("URL = " + obj1.ToString() + "  Site = " + enum2.Current.ToString());
Dim oa1() As [Object]
Dim site As New Site("www.wideworldimporters.com")
Dim oa2 As [Object]() = {url, site}
Dim ev3a As New Evidence(oa1, oa2)
enum1 = ev3a.GetHostEnumerator()
Dim enum2 As IEnumerator = ev3a.GetAssemblyEnumerator()
enum2.MoveNext()
Dim obj1 As [Object] = enum2.Current
enum2.MoveNext()
Console.WriteLine(("URL = " & obj1.ToString() & "  Site = " & enum2.Current.ToString()))

Applies to