本文整理汇总了C#中System.Security.Policy.Evidence.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# Evidence.Clear方法的具体用法?C# Evidence.Clear怎么用?C# Evidence.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Security.Policy.Evidence
的用法示例。
在下文中一共展示了Evidence.Clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EvidenceCallMethods
public static void EvidenceCallMethods()
{
Evidence e = new Evidence();
e = new Evidence(new Evidence());
e.Clear();
Evidence e2 = e.Clone();
System.Collections.IEnumerator ie = e.GetAssemblyEnumerator();
ie = e.GetHostEnumerator();
e.Merge(e2);
}
示例2: Clear
public void Clear ()
{
Evidence e = new Evidence ();
Assert.AreEqual (0, e.Count, "Count-Empty");
e.AddAssembly (new object ());
Assert.AreEqual (1, e.Count, "Count+Assembly");
e.AddHost (new object ());
Assert.AreEqual (2, e.Count, "Count+Host");
e.Clear ();
Assert.AreEqual (0, e.Count, "Count-Cleared");
}
示例3: Clear
public void Clear ()
{
Evidence e = new Evidence ();
AssertEquals ("Count-Empty", 0, e.Count);
e.AddAssembly (new object ());
AssertEquals ("Count+Assembly", 1, e.Count);
e.AddHost (new object ());
AssertEquals ("Count+Host", 2, e.Count);
e.Clear ();
AssertEquals ("Count-Cleared", 0, e.Count);
}