namespace HStation
|
{
|
/// <summary>
|
///
|
/// </summary>
|
internal class RevitFlagsHelper
|
{
|
//
|
// 摘要:
|
// 分隔符
|
public const string Separator = ",";
|
|
//
|
// 摘要:
|
// 转化为字符串
|
public static string ToString(List<string> list)
|
{
|
if (list == null || !list.Any())
|
{
|
return string.Empty;
|
}
|
list = list.Select(x => x.Trim()).ToList();
|
return string.Join(",", list);
|
}
|
|
//
|
// 摘要:
|
// 转化为列表
|
public static List<string> ToList(string str)
|
{
|
if (string.IsNullOrEmpty(str))
|
{
|
return new List<string>();
|
}
|
var list = str.Split(new string[1] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
return list?.Select(x => x.Trim()).ToList();
|
}
|
|
|
}
|
}
|