/// <summary> /// Converts an instance definition to an array of strings, /// which can be used as values for a treeGridItem. /// <see cref="TreeGridItem"/> /// <seealso cref="TreeGridItemCollection"/> /// </summary> /// <param name="definition"></param> /// <returns></returns> public static string[] ToValues(this InstanceDefinition definition) { string[] values = new string[4]; values[_name_index] = definition.Name; values[_is_root_index] = definition.IsRoot().ToString(); values[_is_in_use_index] = definition.IsInUse().ToString(); values[_part_count_index] = definition.PartCount().ToString(); return(values); }