public static LaundryMachineStateCode ValueOrErrorIfNDef(this LaundryMachineStateCode code) =>
 code.IsStateDefined() ? code : LaundryMachineStateCode.Error;
 public static LaundryMachineStateCode ValueOrThrowIfNDef(this LaundryMachineStateCode code) =>
 code.IsStateDefined()
         ? code
         : throw new InvalidEnumArgumentException(nameof(code), (int)code, typeof(LaundryMachineStateCode));