private void addParameterCollection(IParameterCollection list) { bool isOk = ((list != null) && (list is IParameterList)); if (isOk) { this.jwriter.writeStartObject(); this.jwriter.writePropertyName("collection_id"); this.jwriter.writeValue(list.getId()); if (!String.IsNullOrEmpty(list.getName())) { this.jwriter.writePropertyName("name"); this.jwriter.writeValue(list.getName()); } if (!String.IsNullOrEmpty(list.getDescription())) { this.jwriter.writePropertyName("description"); this.jwriter.writeValue(list.getDescription()); } this.jwriter.writePropertyName("parameters"); this.jwriter.writeStartArray(); for (uint i = 0; i < list.count(); i++) { this.addParameter(((IParameterList)list).get(i)); } this.jwriter.writeEndArray(); this.jwriter.writeEndObject(); } else { throw new ArgumentException("Argument 'list' must be not null and " + "an implemented IParameterList object."); } }