Browse Source

Remove all conditionals following PR

pull/1405/head
Patrick Klaeren 5 years ago
parent
commit
a9875b42f6
1 changed files with 0 additions and 4 deletions
  1. +0
    -4
      src/Discord.Net.Core/Entities/Roles/Color.cs

+ 0
- 4
src/Discord.Net.Core/Entities/Roles/Color.cs View File

@@ -1,8 +1,6 @@
using System; using System;
using System.Diagnostics; using System.Diagnostics;
#if NETSTANDARD2_1 || NETSTANDARD2_0 || NET45
using StandardColor = System.Drawing.Color; using StandardColor = System.Drawing.Color;
#endif


namespace Discord namespace Discord
{ {
@@ -190,12 +188,10 @@ namespace Discord


public override int GetHashCode() => RawValue.GetHashCode(); public override int GetHashCode() => RawValue.GetHashCode();


#if NETSTANDARD2_1 || NETSTANDARD2_0 || NET45
public static implicit operator StandardColor(Color color) => public static implicit operator StandardColor(Color color) =>
StandardColor.FromArgb((int)color.RawValue); StandardColor.FromArgb((int)color.RawValue);
public static explicit operator Color(StandardColor color) => public static explicit operator Color(StandardColor color) =>
new Color((uint)color.ToArgb() << 8 >> 8); new Color((uint)color.ToArgb() << 8 >> 8);
#endif


/// <summary> /// <summary>
/// Gets the hexadecimal representation of the color (e.g. <c>#000ccc</c>). /// Gets the hexadecimal representation of the color (e.g. <c>#000ccc</c>).


Loading…
Cancel
Save