Cucumber.SimpleDb.Transport.SimpleDbRestService.ParseAttribute C# (CSharp) Method

ParseAttribute() private static method

private static ParseAttribute ( NameValueCollection values, int itemCount, int attributeCount, dynamic attribute, string attributeValue ) : int
values System.Collections.Specialized.NameValueCollection
itemCount int
attributeCount int
attribute dynamic
attributeValue string
return int
        private static int ParseAttribute(NameValueCollection values, int itemCount, int attributeCount, dynamic attribute, string attributeValue)
        {
            values.Add(
                string.Format("Item.{0}.Attribute.{1}.Name", itemCount, attributeCount),
                attribute.Name);
            values.Add(
                string.Format("Item.{0}.Attribute.{1}.Value", itemCount, attributeCount),
                attributeValue);
            if (ObjectExtensions.HasMember(attribute, "Replace"))
            {
                if (attribute.Replace == true)
                {
                    values.Add(
                        string.Format("Item.{0}.Attribute.{1}.Replace", itemCount, attributeCount),
                        "true");
                }
            }
            attributeCount++;
            return attributeCount;
        }