Hangfire.Console
Hangfire.Console copied to clipboard
Make ConsoleTextColor ctor public
As I see, it just specifies an html color. I think it will be cool to allow specify any color if ctor become public.
Here is a workaround that uses reflection to invoke the private constructor and create custom colors.
public static ConsoleTextColor GetColorViaReflection(string color)
{
var ctor = typeof(ConsoleTextColor).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new[] { typeof(string) }, null);
return (ConsoleTextColor)ctor.Invoke(new[] { color });
}