private string TranslateToRussian(VoucherState state) { return(state switch { VoucherState.Opened => "Открыта", VoucherState.Completed => "Завершена", VoucherState.Expired => "Просрочена", VoucherState.Canceled => "Отменена", _ => throw new NotImplementedException("Остался больше ничего нет"), });
public void SetState(VoucherState voucherState) { State = voucherState; }
public void SetState(VoucherState voucherState) { State = voucherState; ValidationMessage = $"You cannot apply multiple {Type.ToString()} Voucher to the same Basket"; }