reactivevalidatedobject

ReactiveUI and Validation

不羁岁月 提交于 2019-12-23 03:11:13
问题 What's considered "best practice" when performing data validation while using ReactiveUI ? Let's say I have a view model that looks like this: public class MyViewModel: ReactiveObject { public ReactiveAsyncCommand SaveMyDataCommand { get; protected set; } private string _email; public string Email { get { return _email; } set { _email = value; raisePropertyChanged("Email"); } } private string _name; public string Name { get { return _name; } set { _name= value; raisePropertyChanged("Name"); }

ReactiveUI and Validation

南笙酒味 提交于 2019-12-07 02:55:45
What's considered "best practice" when performing data validation while using ReactiveUI ? Let's say I have a view model that looks like this: public class MyViewModel: ReactiveObject { public ReactiveAsyncCommand SaveMyDataCommand { get; protected set; } private string _email; public string Email { get { return _email; } set { _email = value; raisePropertyChanged("Email"); } } private string _name; public string Name { get { return _name; } set { _name= value; raisePropertyChanged("Name"); } } private bool _sendEmail = false; public bool SendEmail { get { return _sendEmail; } set { _sendEmail