public MuteEditViewModel(MuteEditAction action)
        {
            Action = action;

            Validate(() => Filter).NotEmpty();
            Validate(() => EndDate)
            .If(() => HasEndDate)
            .Check(dt => DateTime.Now < dt)
            .Message(Strings.DastMustNotBeInThePast);

            EndDate       = DateTime.Now.AddMonths(1);
            HasEndDate    = false;
            CaseSensitive = false;
        }
Exemple #2
0
 public MuteEditArgs(MuteEditAction action, string filter, DateTime?endDate)
 {
     Action  = action;
     Filter  = filter;
     EndDate = endDate;
 }