本文整理汇总了C#中System.Security.Cryptography.X509Certificates.X509CertificateCollection.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# X509CertificateCollection.Remove方法的具体用法?C# X509CertificateCollection.Remove怎么用?C# X509CertificateCollection.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Security.Cryptography.X509Certificates.X509CertificateCollection
的用法示例。
在下文中一共展示了X509CertificateCollection.Remove方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Remove_Null
public void Remove_Null ()
{
X509CertificateCollection c = new X509CertificateCollection ();
// non existing
c.Remove (null);
}
示例2: Remove_ByValue
public void Remove_ByValue ()
{
X509CertificateCollection c = new X509CertificateCollection ();
X509Certificate x = null;
try {
// don't fail in this block
c.Add (x509a);
Assert.AreEqual (1, c.Count, "Read Count==1");
// works by object reference (not by value)
x = new X509Certificate (cert_a);
Assert.IsTrue (!Object.ReferenceEquals (x509a, x), "!ReferenceEquals");
}
catch {}
// fail here! (well for 1.x)
c.Remove (x);
Assert.AreEqual (0, c.Count, "Remove-by-value Count==0");
}
示例3: Remove
public void Remove ()
{
X509CertificateCollection c = new X509CertificateCollection ();
c.Add (x509a);
Assert.AreEqual (1, c.Count, "Count==1");
c.Remove (x509a);
Assert.AreEqual (0, c.Count, "Remove Count==0");
}
示例4: Remove_Unexisting
public void Remove_Unexisting ()
{
X509CertificateCollection c = new X509CertificateCollection ();
// non existing
c.Remove (x509a);
}
示例5: Remove
public void Remove ()
{
X509CertificateCollection c = new X509CertificateCollection ();
c.Add (x509a);
AssertEquals ("Count==1", 1, c.Count);
c.Remove (x509a);
AssertEquals ("Remove,Count==0", 0, c.Count);
}