public void SetStatus(string owner, EntityStatus status) { if (string.IsNullOrEmpty(owner)) { throw new ConfigStoreException(ConfigStoreError.InvalidOwnerName); } using (ConfigDatabase db = this.Store.CreateContext()) { this.SetStatus(db, owner, status); } }
public Anchor[] Get(long[] certificateIDs) { if (certificateIDs.IsNullOrEmpty()) { throw new ConfigStoreException(ConfigStoreError.InvalidIDs); } using (ConfigDatabase db = this.Store.CreateReadContext()) { return(db.Anchors.Get(certificateIDs).ToArray()); } }
public void Remove(string ownerName) { if (string.IsNullOrEmpty(ownerName)) { throw new ConfigStoreException(ConfigStoreError.InvalidOwnerName); } using (ConfigDatabase db = this.Store.CreateContext()) { this.Remove(db, ownerName); } }
public void Remove(string name) { if (string.IsNullOrEmpty(name)) { throw new ArgumentException("name"); } using (ConfigDatabase db = this.Store.CreateContext()) { this.Remove(db, name); } }
public void Add(ConfigDatabase db, NamedBlob blob) { if (db == null) { throw new ArgumentNullException("db"); } if (blob == null) { throw new ArgumentNullException("blob"); } db.Blobs.InsertOnSubmit(blob); }
public void Add(long domainID , string SMTPName , int preference) { using (ConfigDatabase db = this.Store.CreateContext()) { this.Add(db , domainID , SMTPName , preference); db.SubmitChanges(); } }
public Domain Get(ConfigDatabase db, string name) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(name)) { throw new ConfigStoreException(ConfigStoreError.InvalidDomainName); } return(db.Domains.Get(name)); }
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); }
public DnsRecord[] Get(string domainName) { if (string.IsNullOrEmpty(domainName)) { throw new ConfigStoreException(ConfigStoreError.InvalidDomainName); } using (ConfigDatabase db = this.Store.CreateReadContext()) { return(this.Get(db , domainName).ToArray()); } }
public void Add(Property property) { if (property == null) { throw new ArgumentNullException("property"); } using (ConfigDatabase db = this.Store.CreateContext()) { this.Add(db, property); db.SubmitChanges(); } }
public void Remove(ConfigDatabase db, string name) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(name)) { throw new ArgumentException("name"); } db.Properties.ExecDelete(name); }
public IEnumerable <Property> GetStartsWith(ConfigDatabase db, string namePrefix) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(namePrefix)) { throw new ArgumentException("name"); } return(db.Properties.GetNameStartsWith(namePrefix)); }
public IEnumerable <Property> Get(ConfigDatabase db, string[] names) { if (db == null) { throw new ArgumentNullException("db"); } if (names.IsNullOrEmpty()) { throw new ArgumentException("names"); } return(db.Properties.Get(names)); }
public void Add(NamedBlob blob) { if (blob == null) { throw new ArgumentNullException("blob"); } using (ConfigDatabase db = this.Store.CreateContext()) { this.Add(db, blob); db.SubmitChanges(); } }
public Property Get(ConfigDatabase db, string name) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(name)) { throw new ArgumentException("name"); } return(db.Properties.Get(name).SingleOrDefault()); }
public CertPolicyGroup[] GetByDomains(string[] owners) { if (owners.IsNullOrEmpty()) { throw new ConfigStoreException(ConfigStoreError.InvalidOwnerName); } using (ConfigDatabase db = this.Store.CreateReadContext()) { var cpgs = db.CertPolicyGroups.GetByOwners(owners); return(cpgs.ToArray()); } }
public CertPolicyGroupDomainMap[] GetWithOwners(ConfigDatabase db, string name) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(name)) { throw new ConfigStoreException(ConfigStoreError.InvalidCertPolicyGroupName); } return(db.CertPolicyGroups.GetWithOwners(name).ToArray()); }
/// <summary> /// Add a new email address /// </summary> /// <remarks> /// - Gets the domain of the address and ensures that it exists /// - Then tries to create an entry in the Address table /// - The address is created in the given state /// </remarks> /// <param name="mailAddress">Mail address object</param> /// <param name="status">entity status</param> /// <param name="addressType"></param> public void Add(MailAddress mailAddress, EntityStatus status, string addressType) { if (mailAddress == null) { throw new ArgumentNullException("mailAddress"); } using (ConfigDatabase db = this.Store.CreateContext()) { this.Add(db, mailAddress, status, addressType); db.SubmitChanges(); } }
public IEnumerable <NamedBlob> GetNameStartsWith(ConfigDatabase db, string name) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(name)) { throw new ArgumentException("name"); } return(db.Blobs.GetNameStartsWith(name)); }
public Mdn Get(ConfigDatabase db, string mdnIdentifier) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(mdnIdentifier)) { throw new ConfigStoreException(ConfigStoreError.InvalidMdnIdentifier); } return(db.Mdns.Get(mdnIdentifier)); }
public CertPolicy Get(ConfigDatabase db, string name) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(name)) { throw new ConfigStoreException(ConfigStoreError.InvalidCertPolicyName); } return(db.CertPolicies.Get(name)); }
public CertPolicy[] GetOutgoingByOwner(string owner, CertPolicyUse use) { if (string.IsNullOrEmpty(owner)) { throw new ConfigStoreException(ConfigStoreError.InvalidOwnerName); } using (ConfigDatabase db = this.Store.CreateReadContext()) { var cpgs = db.CertPolicies.GetOutgoing(owner, use); return(cpgs.ToArray()); } }
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); }
public void Remove(ConfigDatabase db, string ownerName) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(ownerName)) { throw new ConfigStoreException(ConfigStoreError.InvalidOwnerName); } db.Bundles.ExecDelete(ownerName); }
public IEnumerable <Bundle> Get(ConfigDatabase db, string owner) { if (db == null) { throw new ArgumentNullException("db"); } if (string.IsNullOrEmpty(owner)) { throw new ConfigStoreException(ConfigStoreError.InvalidOwnerName); } return(db.Bundles.Get(owner)); }
public void Add(ConfigDatabase db, DnsRecord record) { if (db == null) { throw new ArgumentNullException("db"); } if (record == null) { throw new ConfigStoreException(ConfigStoreError.InvalidDnsRecord); } db.DnsRecords.InsertOnSubmit(record); }
public IEnumerable <Address> Get(ConfigDatabase db, long[] addressIDs, EntityStatus?status) { if (db == null) { throw new ArgumentNullException("db"); } if (status == null) { return(db.Addresses.Get(addressIDs)); } return(db.Addresses.Get(addressIDs, status.Value)); }
public void Update(ConfigDatabase db, Mdn mdn) { if (db == null) { throw new ArgumentNullException("db"); } if (mdn == null) { throw new ConfigStoreException(ConfigStoreError.InvalidMdn); } db.Mdns.InsertOnSubmit(mdn); }
public void TimeOut(ConfigDatabase db, Mdn mdn) { if (db == null) { throw new ArgumentNullException("db"); } if (mdn == null) { throw new ConfigStoreException(ConfigStoreError.InvalidMdn); } mdn.Status = MdnStatus.TimedOut; db.Mdns.InsertOnSubmit(mdn); }
public DnsRecord[] Get(string domainName , Common.DnsResolver.DnsStandard.RecordType typeID) { if (string.IsNullOrEmpty(domainName)) { throw new ConfigStoreException(ConfigStoreError.InvalidDomainName); } using (ConfigDatabase db = this.Store.CreateReadContext()) { return(this.Get(db , domainName , typeID).ToArray()); } }