ARUP.IssueTracker.Converters.ListConverter.Convert C# (CSharp) Method

Convert() public method

public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object
targetType System.Type
parameter object
culture System.Globalization.CultureInfo
return object
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string components = "none";
            List<Component> list = (List<Component>)value;
            if (list != null && list.Any())
            {
                components = "";
                foreach (var c in list)
                    components += c.name + ", ";
                components = components.Remove(components.Count() - 2);
            }
            return components;
        }