/// <inheritdoc /> public override void SaveChanges(Boolean forceDelete) { BaseEntry.Properties["cACertificate"].Clear(); foreach (DsCertificateEntry cert in DsList["NTAuth"]) { BaseEntry.Properties["cACertificate"].Add(cert.Certificate.RawData); } BaseEntry.CommitChanges(); CleanupSave(); }
/// <summary> /// Checks if the DS object can be deleted when it contains no certificates after certificate removal. /// This method does nothing if no certificates were removed from DS object. /// </summary> /// <param name="entry">Specifies the DS entry to check.</param> /// <param name="entryName">Specifies the entry's CN name.</param> /// <returns> /// <strong>True</strong> if there are no more certificates and DS object is no longer necessary. Otherwise /// <strong>False</strong>. /// </returns> protected Boolean CheckDelete(DirectoryEntry entry, String entryName) { // if there was at least one removal and DS entry is empty from any certificate, // delete DS entry. Otherwise do nothing if (_toBeRemoved.Contains(entryName) && DsList[entryName].Count == 0) { BaseEntry.Children.Remove(entry); BaseEntry.CommitChanges(); return(true); } return(false); }