if (parameters != null) {
var list = new List<string> ();
foreach (var p in parameters.Elements ("parameter")) {
- var pTypeName = p.GetTypeName ("type");
- list.Add (State.IgnoreParameterNameChanges
- ? pTypeName
- : pTypeName + " " + p.GetAttribute ("name"));
+ var param = p.GetTypeName ("type");
+ if (!State.IgnoreParameterNameChanges)
+ param += " " + p.GetAttribute ("name");
+
+ var direction = p.GetAttribute ("direction");
+ if (direction?.Length > 0)
+ param = direction + " " + param;
+
+ list.Add (param);
}
sb.Append (String.Join (", ", list));
}