Svg.Transforms.SvgTransformConverter.ConvertTo C# (CSharp) Method

ConvertTo() public method

public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
value object
destinationType System.Type
return object
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType == typeof(string))
            {
                var transforms = value as SvgTransformCollection;

                if (transforms != null)
                {
                    return string.Join(" ", transforms.Select(t => t.WriteToString()).ToArray());
                }
            }

            return base.ConvertTo(context, culture, value, destinationType);
        }
    }