Пример #1
0
 public Bundle Add(Bundle bundle)
 {
     using (ConfigDatabase db = this.Store.CreateContext())
     {
         this.Add(db, bundle);
         db.SubmitChanges();
         return bundle;
     }
 }
Пример #2
0
 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);
 }
Пример #3
0
 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);
     }
 }
Пример #4
0
        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);
        }
Пример #5
0
 public void AddBundles(Bundle[] bundles)
 {
     try
     {
         Store.Bundles.Add(bundles);
     }
     catch (Exception ex)
     {
         throw CreateFault("AddBundles", ex);
     }
 }
Пример #6
0
 public Bundle AddBundle(Bundle bundle)
 {
     try
     {
         return Store.Bundles.Add(bundle);
     }
     catch (Exception ex)
     {
         throw CreateFault("AddBundles", ex);
     }
 }
Пример #7
0
 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)
                                );
 }