public Bundle Add(Bundle bundle) { using (ConfigDatabase db = this.Store.CreateContext()) { this.Add(db, bundle); db.SubmitChanges(); return bundle; } }
public void Add(ConfigDatabase db, Bundle bundle) { if (db == null) { throw new ArgumentNullException("db"); } if (bundle == null) { throw new ConfigStoreException(ConfigStoreError.InvalidBundle); } db.Bundles.InsertOnSubmit(bundle); }
private void AddAnchorsForBundle(Bundle bundle, X509Certificate2Collection certs) { try { X509Certificate2Collection bundleCerts = m_downloader.DownloadCertificates(bundle.Uri); if (!bundleCerts.IsNullOrEmpty()) { certs.Add(bundleCerts); } } catch (Exception e) { this.NotifyError(bundle, e); } }
private bool BundlesMatch(Bundle bundle1, Bundle bundle2) { // note we don't match everything... e.g., create date and such if ((bundle1.ForIncoming == bundle2.ForIncoming) && (bundle1.ForOutgoing == bundle2.ForOutgoing) && (bundle1.Owner == bundle2.Owner) && (bundle1.Url == bundle2.Url)) { return (true); } return (false); }
public void AddBundles(Bundle[] bundles) { try { Store.Bundles.Add(bundles); } catch (Exception ex) { throw CreateFault("AddBundles", ex); } }
public Bundle AddBundle(Bundle bundle) { try { return Store.Bundles.Add(bundle); } catch (Exception ex) { throw CreateFault("AddBundles", ex); } }
private void NotifyError(Bundle bundle, Exception e) { if (this.Error != null ) { this.Error(e); } EventLogHelper.WriteWarning(null, string.Format("BundleResolver: Failed pulling certs from bundle URL: {0}, [{1}]", bundle.Url, e) ); }