/// <inheritdoc /> public SubCommand6DAttribute(SubCommand6DOperationCode opCode) : base((int)opCode, typeof(BaseSubCommand6D)) { if (!Enum.IsDefined(typeof(SubCommand6DOperationCode), opCode)) { throw new InvalidEnumArgumentException(nameof(opCode), (int)opCode, typeof(SubCommand6DOperationCode)); } }
protected BaseSubCommand6D(SubCommand6DOperationCode commandOperationCode) { //This is in a serialization hotpath so we don't verify the enum with //and throw because it depends on slow reflection. CommandOperationCode = commandOperationCode; }
/// <summary> /// One of the sub6D commands actually sends the sender /// in the above byte. /// </summary> /// <param name="commandOperationCode"></param> /// <param name="optionalIdentifier"></param> protected BaseSubCommand6D(SubCommand6DOperationCode commandOperationCode, byte optionalIdentifier) : this(commandOperationCode) { OptionalIdentifier = optionalIdentifier; }