Esempio n. 1
0
 /// <summary>
 /// 获取消息样式
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 protected virtual string?GetClassString(ConsoleMessageItem item)
 {
     return(CssBuilder.Default()
            .AddClass($"text-{item.Color.ToDescriptionString()}", item.Color != Color.None)
            .Build());
 }
Esempio n. 2
0
 /// <summary>
 /// 获取消息样式
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 private string?GetClassString(ConsoleMessageItem item) => CssBuilder.Default()
 .AddClass($"text-{item.Color.ToDescriptionString()}", item.Color != Color.None)
 .Build();