public void SaveClick(IEditContactEntity entity) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } var validationSkype = SkypeTextChanged(entity.Skype); var validationPhone = PhoneTextChanged(entity.Phone); var validationCity = CityTextChanged(entity.City); if (_currentRecieveStatus == EControllerStatus.Processing | !(validationSkype && validationPhone && validationCity)) { if (!validationSkype) { Presenter.InvalidSkypeInput(); } if (!validationPhone) { Presenter.InvalidPhoneInput(); } if (!validationCity) { Presenter.InvalidCityInput(); } return; } _controller.Send(_modelCreator.GetRequestModel(entity)); }
public UserInfoDTO GetRequestModel(IEditContactEntity entity) { return(new UserInfoDTO(entity ?? throw new NullReferenceException(nameof(entity)))); }