ActionResultBase IDomainGet.Get(WebPanelItemCollection saveCollection)
        {
            DirectAdmin_ActionResult result = new DirectAdmin_ActionResult();

            result.DataTextProccessor = new DirectAdmin_ActionResult.DataTextHandler((InputText) =>
            {
                foreach (KeyValuePair <string, string> domainNow  in StrHelpClass.ToKeyValueURLString(InputText, true))
                {
                    saveCollection.Add(new DirectAdmin_Domain(domainNow.Key, StrHelpClass.ToNameValueURLString(domainNow.Value)));
                }
                return(ActionResultCode.Success);
            });
            result.ExecuteQuery(WebNetCommunication.BuildGetRequest(BuildCommandQuery("CMD_API_ADDITIONAL_DOMAINS", ""), this.Account.WebSession));
            return(result);
        }
        /// <summary>
        /// Метод получает все поддомены для указанного поддомена
        /// </summary>
        ActionResultBase GetAllAdditionalDomains(DomainItem domain, WebPanelItemCollection SubDomainList)
        {
            DirectAdmin_ActionResult result = new DirectAdmin_ActionResult();

            result.DataTextProccessor = new DirectAdmin_ActionResult.DataTextHandler((InputText) =>
            {
                foreach (KeyValuePair <string, string> domainNow in StrHelpClass.ToKeyValueURLString(InputText, true))
                {
                    SubDomainList.Add(new SubDomainItem(domain.Name, domainNow.Value));
                }
                return(ActionResultCode.Success);
            });
            CommandArgs arg = new CommandArgs("domain", domain.Name);

            result.ExecuteQuery(WebNetCommunication.BuildGetRequest(BuildCommandQuery("CMD_API_SUBDOMAINS", "", arg), this.Account.WebSession));
            return(result);
        }
        ActionResultBase IDomainGet.Exist(DomainItem Domain2Check)
        {
            DirectAdmin_ActionResult result = new DirectAdmin_ActionResult();

            result.DataTextProccessor = new DirectAdmin_ActionResult.DataTextHandler((InputText) =>
            {
                foreach (KeyValuePair <string, string> domainNow in StrHelpClass.ToKeyValueURLString(InputText, true))
                {
                    if (domainNow.Key.Equals(Domain2Check.Name))
                    {
                        return(ActionResultCode.Success);
                    }
                }
                return(ActionResultCode.Error_ItemNotFound);
            });
            result.ExecuteQuery(WebNetCommunication.BuildGetRequest(BuildCommandQuery("CMD_API_ADDITIONAL_DOMAINS", ""), this.Account.WebSession));
            return(result);
        }
        ActionResultBase ISubDomainGet.Exist(SubDomainItem SubDomain2Check)
        {
            DirectAdmin_ActionResult result = new DirectAdmin_ActionResult();

            result.DataTextProccessor = new DirectAdmin_ActionResult.DataTextHandler((InputText) =>
            {
                foreach (KeyValuePair <string, string> domainNow in StrHelpClass.ToKeyValueURLString(InputText, true))
                {
                    if (SubDomain2Check.SubDomainName.Equals(domainNow.Value))
                    {
                        return(ActionResultCode.Success);
                    }
                }
                return(ActionResultCode.Error_ItemNotFound);
            });
            CommandArgs arg = new CommandArgs("domain", SubDomain2Check.RootDomain);

            result.ExecuteQuery(WebNetCommunication.BuildGetRequest(BuildCommandQuery("CMD_API_SUBDOMAINS", "", arg), this.Account.WebSession));
            return(result);
        }