// 通过字符串构造 public static BreakPointCollcation Build(string strText) { BreakPointCollcation infos = new BreakPointCollcation(); string[] segments = strText.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (string segment in segments) { infos.Add(BreakPointInfo.Build(segment)); } return(infos); }
// 通过数据库名列表字符串构造 public static BreakPointCollcation BuildFromDbNameList(string strText) { BreakPointCollcation infos = new BreakPointCollcation(); string[] dbnames = strText.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (string dbname in dbnames) { BreakPointInfo info = new BreakPointInfo(); info.DbName = dbname; infos.Add(info); } return(infos); }