当前位置: 首页>>代码示例>>C#>>正文


C# X509CertificateCollection.Remove方法代码示例

本文整理汇总了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);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:X509CertificateCollectionTest.cs

示例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");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:20,代码来源:X509CertificateCollectionTest.cs

示例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");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:X509CertificateCollectionTest.cs

示例4: Remove_Unexisting

		public void Remove_Unexisting () 
		{
			X509CertificateCollection c = new X509CertificateCollection ();
			// non existing
			c.Remove (x509a);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:X509CertificateCollectionTest.cs

示例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);
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:X509CertificateCollectionTest.cs


注:本文中的System.Security.Cryptography.X509Certificates.X509CertificateCollection.Remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。