public bool Equals(Colour other) { if (this.Mode == other.Mode) { switch (this.Mode) { case ColourMode.XY: return(ExtensionMethods.ArrayEquals(this.ColourCoordinates, other.ColourCoordinates)); case ColourMode.CT: return(this.ColourTemperature == other.ColourTemperature); default: //return this.Hue == lightState.Hue && this.Saturation == lightState.Saturation; throw new NotImplementedException(); } } else { if (ExtensionMethods.ArrayEquals(this.ColourCoordinates, other.ColourCoordinates)) { return(true); } throw new NotImplementedException(); } }