public Anchor Add(Anchor anchor) { using (ConfigDatabase db = this.Store.CreateContext()) { this.Add(db, anchor); db.SubmitChanges(); return anchor; } }
public void Add(ConfigDatabase db, Anchor anchor) { if (db == null) { throw new ArgumentNullException("db"); } if (anchor == null) { throw new ConfigStoreException(ConfigStoreError.InvalidAnchor); } db.Anchors.InsertOnSubmit(anchor); }
Anchor ApplyGetOptions(Anchor anchor, CertificateGetOptions options) { if (options == null) { options = CertificateGetOptions.Default; } return options.ApplyTo(anchor); }
Anchor[] ApplyGetOptions(Anchor[] anchors, CertificateGetOptions options) { if (anchors == null) { return null; } return (from anchor in (from anchor in anchors select ApplyGetOptions(anchor, options) ) where anchor != null select anchor).ToArray(); }
public void AddAnchors(Anchor[] anchors) { try { Store.Anchors.Add(anchors); } catch (Exception ex) { throw CreateFault("AddAnchors", ex); } }
public Anchor AddAnchor(Anchor anchor) { try { return Store.Anchors.Add(anchor); } catch (Exception ex) { throw CreateFault("AddAnchors", ex); } }
X509Certificate2Collection ToCerts(Anchor[] anchors) { if (anchors == null) { return null; } X509Certificate2Collection certs = new X509Certificate2Collection(); for (int i = 0; i < anchors.Length; ++i) { certs.Add(anchors[i].ToX509Certificate()); } return certs; }
public Anchor Update(Anchor anchor) { throw new NotSupportedException("Updating anchors not supported"); }
public Anchor ChangeStatus(Anchor anchor, EntityStatus status) { Client.SetAnchorStatus(new[] { anchor.ID }, status); anchor.Status = status; return anchor; }
public void Delete(Anchor anchor) { Client.RemoveAnchors(new[] {anchor.ID}); }
public Anchor Add(Anchor anchor) { return Client.AddAnchor(anchor); }
internal Anchor ApplyTo(Anchor anchor) { if (anchor == null) { return anchor; } if (this.Status != null && Status.Value != anchor.Status) { return null; } if (!this.IncludeData) { anchor.ClearData(); } return anchor; }
public static void AddAnchor(this AnchorStoreClient client, Anchor anchor) { client.AddAnchors(new Anchor[] {anchor}); }
public static X509Certificate2Collection ToX509Collection(Anchor[] anchors) { if (anchors.IsNullOrEmpty()) { return null; } X509Certificate2Collection x509Collection = new X509Certificate2Collection(); if (anchors != null) { for (int i = 0; i < anchors.Length; ++i) { x509Collection.Add(anchors[i].ToX509Certificate()); } } return x509Collection; }