/// <summary> /// try delete object /// </summary> /// <returns></returns> bool op() { DsServer dc = (DsServer)EnvironmentConfig.MachineStore[dsServerType]; if (!LdapUtility.IsObjectExist(dc, objectDN)) { return(true); } for (int i = 0; i < 2; i++) { try { System.DirectoryServices.Protocols.ResultCode rCode = ldapAdapter.DeleteObject(dc, objectDN); if (rCode == System.DirectoryServices.Protocols.ResultCode.Success) { return(true); } } catch { System.Threading.Thread.Sleep(1000); } } return(false); }