public static Boolean Contains(this X509ChainElementCollection collection, X509ChainElement item) { return(collection.Cast <X509ChainElement>().Any(x => item.Certificate.Equals(item.Certificate))); }
public static X509ChainElement Item(this X509ChainElementCollection collection, X509ChainElement item) { return(collection.Count == 0 ? null : collection.Cast <X509ChainElement>().FirstOrDefault(x => x.Certificate.Thumbprint == item.Certificate.Thumbprint)); }