public static string Convert(this QueuePromotionFailureMode mode) { switch (mode) { case QueuePromotionFailureMode.Always: return("always"); case QueuePromotionFailureMode.WhenSynced: return("when-synced"); default: throw new ArgumentOutOfRangeException(nameof(mode), mode, null); } }
public void SetQueuePromotionOnFailure(QueuePromotionFailureMode mode) => SetArg("ha-promote-on-failure", mode.Convert());