Esempio n. 1
0
 /// <summary>
 /// Join<br />
 /// 连接
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="list"></param>
 /// <param name="to"></param>
 /// <returns></returns>
 string IJoiner.Join <T>(IEnumerable <T> list, Func <T, string> to)
 {
     return(list.JoinToString(_on, JoinerUtils.GetObjectPredicate <T>(Options), to, Options.GetReplacer <T>()));
 }
Esempio n. 2
0
 /// <summary>
 /// Append to...<br />
 /// 附加到...
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="builder"></param>
 /// <param name="list"></param>
 /// <param name="to"></param>
 /// <returns></returns>
 StringBuilder IJoiner.AppendTo <T>(StringBuilder builder, IEnumerable <T> list, Func <T, string> to)
 {
     CommonJoinUtils.JoinToString(builder, (c, s) => c.Append(s), list, _on, JoinerUtils.GetObjectPredicate <T>(Options), to, replaceFunc: Options.GetReplacer <T>());
     return(builder);
 }
Esempio n. 3
0
 /// <summary>
 /// Join<br />
 /// 连接
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="list"></param>
 /// <param name="converter"></param>
 /// <returns></returns>
 string IJoiner.Join <T>(IEnumerable <T> list, ITypeConverter <T, string> converter)
 {
     return(list.JoinToString(_on, JoinerUtils.GetObjectPredicate <T>(Options), converter, replaceFunc: Options.GetReplacer <T>()));
 }