Beispiel #1
0
 /// <summary>
 /// creates a new <see cref="MessageChunk"/>
 /// </summary>
 /// <param name="type">type of chunk</param>
 /// <param name="content">chunk content</param>
 /// <param name="color">chunk color (optional)</param>
 /// <param name="weight">weight of font</param>
 public MessageChunk(MessageChunkType type, string content, string color = null, FontWeight weight = FontWeight.Default)
 {
     Type       = type;
     Content    = content;
     Color      = color;
     FontWeight = weight;
 }
Beispiel #2
0
 /// <summary>
 /// creates a new <see cref="MessageChunk"/>
 /// </summary>
 /// <param name="type">type of chunk</param>
 /// <param name="content">chunk content</param>
 /// <param name="color">chunk color (optional)</param>
 /// <param name="weight">weight of font</param>
 public MessageChunk(MessageChunkType type, string content, Color color, FontWeight weight = FontWeight.Default)
     : this(type, content, $"rgb({color.R},{color.G}, {color.B})", weight)
 {
 }