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