public void LoadFromConnectionString(string value) { if (!string.IsNullOrWhiteSpace(value)) { var connString = value; if (ConnectionStringBuilder.IsValidConnectionString(connString)) { ConnectionStringBuilder csb = new ConnectionStringBuilder(connString); this.HostName = csb.HostName; this.Port = csb.Port; this.UserName = csb.UserName; this.Password = csb.Password; if (!string.IsNullOrWhiteSpace(csb.VirtualHost)) { this.VHost = csb.VirtualHost; } } } }