コード例 #1
0
        public TimeAlertsViewModel(IUserService userService,
                                   IAlertService alertService,
                                   IConverter converter)
        {
            _userService  = userService;
            _alertService = alertService;
            _converter    = converter;

            _userName = _userService.GetCurrentUser().UserName;
            var displayAlerts = _converter.AlertToDisplayAlert(_alertService.GetAllTimeAlerts(_userName));

            TimeAlerts = displayAlerts;

            Options = new List <string>()
            {
                "All",
                "Active",
                "Sent",
                "Disabled"
            };
        }