Cucumber.SimpleDb.Transport.SimpleDbRestService.DeleteAttributes C# (CSharp) Метод

DeleteAttributes() публичный Метод

public DeleteAttributes ( string domain, string itemName ) : System.Xml.Linq.XElement
domain string
itemName string
Результат System.Xml.Linq.XElement
        public XElement DeleteAttributes(string domain, string itemName, params object[] attributes)
        {
            var values = new NameValueCollection
            {
                {"Action","DeleteAttributes"},
                {"DomainName", domain},
                {"ItemName", itemName}
            };
            int attributeCount = 0;
            try
            {
                foreach (dynamic attribute in attributes)
                {
                    values.Add(
                        string.Format("Attribute.{0}.Name", attributeCount),
                        attribute.Name);
                    values.Add(
                        string.Format("Attribute.{0}.Value", attributeCount),
                        attribute.Value);
                    if (ObjectExtensions.HasMember(attribute, "When"))
                    {
                        dynamic when = attribute.When;
                        values.Add(
                            string.Format("Expected.{0}.Name", attributeCount),
                            attribute.Name);
                        if (ObjectExtensions.HasMember(when, "Value"))
                        {
                            values.Add(
                                string.Format("Expected.{0}.Value", attributeCount),
                                when.Value);
                        }
                        if (ObjectExtensions.HasMember(when, "Exists"))
                        {
                            values.Add(
                                string.Format("Expected.{0}.Exists", attributeCount),
                                when.Exists.ToString());
                        }
                    }
                    attributeCount++;
                }
            }
            catch (Exception ex)
            {
                throw new FormatException("One or more item definitions did not contain the expected properties", ex);
            }
            return InternalExecute(values);
        }