Catel.Data.ModelBase.NotifyWarningsChanged C# (CSharp) Метод

NotifyWarningsChanged() приватный Метод

Notifies all listeners that the warnings for the specified property have changed. If the propertyName is null or string.Empty, the business errors will be updated.
private NotifyWarningsChanged ( string propertyName, bool notifyHasWarnings ) : void
propertyName string Name of the property.
notifyHasWarnings bool if set to true, the property will be notified as well.
Результат void
        private void NotifyWarningsChanged(string propertyName, bool notifyHasWarnings)
        {
            if (string.IsNullOrEmpty(propertyName))
            {
                RaisePropertyChanged(WarningMessageProperty);

                _warningsChanged.SafeInvoke(this, () => new DataErrorsChangedEventArgs(string.Empty));
            }
            else
            {
                RaisePropertyChanged(this, new PropertyChangedEventArgs(propertyName), false, true);

                _warningsChanged.SafeInvoke(this, () => new DataErrorsChangedEventArgs(propertyName));
            }

            if (notifyHasWarnings)
            {
                RaisePropertyChanged(HasWarningsMessageProperty);
            }
        }