Merge pull request #114 from khionu/patch-1
Added ToString and DebuggerDisplay
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Discord
|
namespace Discord
|
||||||
{
|
{
|
||||||
|
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
|
||||||
public struct Color
|
public struct Color
|
||||||
{
|
{
|
||||||
/// <summary> Gets the default user color value. </summary>
|
/// <summary> Gets the default user color value. </summary>
|
||||||
@@ -33,5 +37,10 @@
|
|||||||
((uint)(g * 255.0f) << 8) |
|
((uint)(g * 255.0f) << 8) |
|
||||||
(uint)(b * 255.0f);
|
(uint)(b * 255.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() =>
|
||||||
|
$"#{Convert.ToString(RawValue, 16)}";
|
||||||
|
private string DebuggerDisplay() =>
|
||||||
|
$"#{Convert.ToString(RawValue, 16)} ({RawValue})";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user