private IlluminationZoneControlV1( IlluminationZoneControlMode controlMode, IlluminationZoneType zoneType, byte[] data) { if (!(data?.Length > 0) || data.Length > MaximumNumberOfDataBytes) { throw new ArgumentOutOfRangeException(nameof(data)); } this = typeof(IlluminationZoneControlV1).Instantiate <IlluminationZoneControlV1>(); _ControlMode = controlMode; _ZoneType = zoneType; Array.Copy(data, 0, _Data, 0, data.Length); }
/// <summary> /// Creates a new instance of <see cref="IlluminationZoneControlV1" />. /// </summary> /// <param name="controlMode">The zone control mode.</param> /// <param name="fixedColorData">The zone control fixed color data.</param> public IlluminationZoneControlV1( IlluminationZoneControlMode controlMode, IlluminationZoneControlDataFixedColor fixedColorData) : this(controlMode, IlluminationZoneType.FixedColor, fixedColorData.ToByteArray()) { }
/// <summary> /// Creates a new instance of <see cref="IlluminationZoneControlV1" />. /// </summary> /// <param name="controlMode">The zone control mode.</param> /// <param name="rgbData">The zone control RGB data.</param> public IlluminationZoneControlV1( IlluminationZoneControlMode controlMode, IlluminationZoneControlDataRGB rgbData) : this(controlMode, IlluminationZoneType.RGB, rgbData.ToByteArray()) { }