static void Add (ObjectType type, X509Store store, string file, string password, bool verbose)
{
switch (type) {
case ObjectType.Certificate:
X509CertificateCollection coll = LoadCertificates (file, password, verbose);
foreach (X509Certificate x509 in coll) {
store.Import (x509);
}
Console.WriteLine ("{0} certificate(s) added to store {1}.",
coll.Count, store.Name);
break;
case ObjectType.CRL:
ArrayList list = LoadCRLs (file);
foreach (X509Crl crl in list) {
store.Import (crl);
}
Console.WriteLine ("{0} CRL(s) added to store {1}.",
list.Count, store.Name);
break;
default:
throw new NotSupportedException (type.ToString ());
}
}