void IConfigurationSession.DeleteTree(ADConfigurationObject instanceToDelete, TreeDeleteNotFinishedHandler handler) { base.InvokeWithAPILogging <bool>(delegate { this.GetSession().DeleteTree(instanceToDelete, handler); return(true); }, "DeleteTree"); }
public void Save(ADConfigurationObject instanceToSave) { if (instanceToSave == null) { throw new ArgumentNullException("instanceToSave"); } base.Save(instanceToSave, instanceToSave.Schema.AllProperties); }
void IConfigurationSession.Save(ADConfigurationObject instanceToSave) { base.InvokeWithAPILogging <bool>(delegate { this.InternalSave(instanceToSave); return(true); }, "Save"); }
public void DeleteTree(ADConfigurationObject instanceToDelete, TreeDeleteNotFinishedHandler handler) { if (instanceToDelete == null) { throw new ArgumentNullException("instanceToDelete"); } ADConfigurationSession adconfigurationSession = this; IDirectorySession session = instanceToDelete.Session; try { for (;;) { try { adconfigurationSession.Delete(instanceToDelete, true); } catch (ADTreeDeleteNotFinishedException ex) { ExTraceGlobals.ADTopologyTracer.TraceWarning <string, string>((long)this.GetHashCode(), "ADTreeDeleteNotFinishedException is caught while deleting the whole tree '{0}': {1}", instanceToDelete.Identity.ToString(), ex.Message); if (handler != null) { handler(ex); } if (string.IsNullOrEmpty(adconfigurationSession.DomainController)) { adconfigurationSession = (ADConfigurationSession)this.Clone(); adconfigurationSession.DomainController = ex.Server; instanceToDelete.m_Session = null; } continue; } break; } } finally { instanceToDelete.m_Session = session; } }
public void Delete(ADConfigurationObject instanceToDelete) { base.Delete(instanceToDelete); }