diff --git a/src/Generator.Bind/XmlSpecReader.cs b/src/Generator.Bind/XmlSpecReader.cs index 67e72648..7907dfe3 100644 --- a/src/Generator.Bind/XmlSpecReader.cs +++ b/src/Generator.Bind/XmlSpecReader.cs @@ -304,21 +304,14 @@ namespace Bind p.CurrentType = param.GetAttribute("type", String.Empty).Trim(); p.Name = param.GetAttribute("name", String.Empty).Trim(); - string element_count = param.GetAttribute("elementcount", String.Empty).Trim(); - if (String.IsNullOrEmpty(element_count)) + p.ComputeSize = param.GetAttribute("count", String.Empty).Trim(); + + int elementCount; + if (Int32.TryParse(p.ComputeSize, out elementCount)) { - element_count = param.GetAttribute("count", String.Empty).Trim(); - if (!String.IsNullOrEmpty(element_count)) - { - int count; - if (Int32.TryParse(element_count, out count)) - { - p.ElementCount = count; - } - } + p.ElementCount = elementCount; } - p.ComputeSize = param.GetAttribute("count", String.Empty).Trim(); p.Flow = Parameter.GetFlowDirection(param.GetAttribute("flow", String.Empty).Trim()); d.Parameters.Add(p);