本文整理匯總了C#中System.Security.Policy.Evidence.GetHostEnumerator方法的典型用法代碼示例。如果您正苦於以下問題:C# Evidence.GetHostEnumerator方法的具體用法?C# Evidence.GetHostEnumerator怎麽用?C# Evidence.GetHostEnumerator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Security.Policy.Evidence
的用法示例。
在下文中一共展示了Evidence.GetHostEnumerator方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Url
Url url = new Url("http://www.treyresearch.com");
Console.WriteLine("Adding host evidence " + url.ToString());
ev2a.AddHost(url);
Evidence ev2b = new Evidence(ev2a);
Console.WriteLine("Copy evidence into new evidence");
IEnumerator enum1 = ev2b.GetHostEnumerator();
enum1.MoveNext();
Console.WriteLine(enum1.Current.ToString());
示例2: Evidence.GetHostEnumerator()
//引入命名空間
using System;
using System.Reflection;
using System.Collections;
using System.Security.Policy;
public class MainClass {
public static void Main(string[] args) {
Assembly a = Assembly.LoadFrom(args[0]);
Evidence e = a.Evidence;
IEnumerator x = e.GetHostEnumerator();
Console.WriteLine("HOST EVIDENCE COLLECTION:");
while (x.MoveNext()) {
Console.WriteLine(x.Current.ToString());
}
}
}