System.Security.Cryptography.X509Certificates.X509Chain.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

Same methods

X509Chain::Dispose ( bool disposing ) : void

Usage Example

		ValidationResult ValidateChain (string host, bool server, X509Certificate leaf,
		                                X509Chain chain, X509CertificateCollection certs,
		                                SslPolicyErrors errors)
		{
			var oldChain = chain;
			var ownsChain = chain == null;
			try {
				var result = ValidateChain (host, server, leaf, ref chain, certs, errors);
				if (chain != oldChain)
					ownsChain = true;

				return result;
			} finally {
				// If ValidateChain() changed the chain, then we need to free it.
				if (ownsChain && chain != null)
					chain.Dispose ();
			}
		}
All Usage Examples Of System.Security.Cryptography.X509Certificates.X509Chain::Dispose