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;
}