/// <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);
        }
 internal DirectoryResponse(XmlNode node)
 {
     this.result = ~System.DirectoryServices.Protocols.ResultCode.Success;
     this.dsmlNode = node;
     this.dsmlNS = NamespaceUtils.GetDsmlNamespaceManager();
     this.dsmlRequest = true;
 }
示例#3
0
 internal DirectoryResponse(XmlNode node)
 {
     this.result      = ~System.DirectoryServices.Protocols.ResultCode.Success;
     this.dsmlNode    = node;
     this.dsmlNS      = NamespaceUtils.GetDsmlNamespaceManager();
     this.dsmlRequest = true;
 }
 internal DirectoryResponse(string dn, DirectoryControl[] controls, System.DirectoryServices.Protocols.ResultCode result, string message, Uri[] referral)
 {
     this.result = ~System.DirectoryServices.Protocols.ResultCode.Success;
     this.dn = dn;
     this.directoryControls = controls;
     this.result = result;
     this.directoryMessage = message;
     this.directoryReferral = referral;
 }
示例#5
0
 internal DirectoryResponse(string dn, DirectoryControl[] controls, System.DirectoryServices.Protocols.ResultCode result, string message, Uri[] referral)
 {
     this.result            = ~System.DirectoryServices.Protocols.ResultCode.Success;
     this.dn                = dn;
     this.directoryControls = controls;
     this.result            = result;
     this.directoryMessage  = message;
     this.directoryReferral = referral;
 }
 internal SearchResponse(string dn, DirectoryControl[] controls, System.DirectoryServices.Protocols.ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral)
 {
     this.referenceCollection = new SearchResultReferenceCollection();
     this.entryCollection     = new SearchResultEntryCollection();
 }