示例#1
0
 void IConfigurationSession.DeleteTree(ADConfigurationObject instanceToDelete, TreeDeleteNotFinishedHandler handler)
 {
     base.InvokeWithAPILogging <bool>(delegate
     {
         this.GetSession().DeleteTree(instanceToDelete, handler);
         return(true);
     }, "DeleteTree");
 }
示例#2
0
 public void Save(ADConfigurationObject instanceToSave)
 {
     if (instanceToSave == null)
     {
         throw new ArgumentNullException("instanceToSave");
     }
     base.Save(instanceToSave, instanceToSave.Schema.AllProperties);
 }
示例#3
0
 void IConfigurationSession.Save(ADConfigurationObject instanceToSave)
 {
     base.InvokeWithAPILogging <bool>(delegate
     {
         this.InternalSave(instanceToSave);
         return(true);
     }, "Save");
 }
示例#4
0
        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;
            }
        }
示例#5
0
 public void Delete(ADConfigurationObject instanceToDelete)
 {
     base.Delete(instanceToDelete);
 }