public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { if (value is string) { string[] parts = ((string)value).Split(new char[] { ',' }); Server server = new Server(); server.Host = parts[0]; if (parts.Length > 1) server.Port = int.Parse(parts[1]); return server; } return base.ConvertFrom(context, culture, value); }
public MPC(Server server) : this(server.Host, server.Port) { }