Пример #1
0
        /// <inheritdoc />
        public IEnumerable <Message> Validate(IPropertyContainer propertyContainer)
        {
            IPropertyValue <T> propertyValue = propertyContainer.GetPropertyValue(Property, Search.ExistingOnly.ReturnNotDefined());

            if (propertyValue.IsNullOrNotDefined())
            {
                yield return(this.GetConfiguredMessage(propertyValue, propertyContainer));
            }
        }
        /// <inheritdoc />
        public IEnumerable <Message> Validate(IPropertyValue <T>?propertyValue, IPropertyContainer propertyContainer)
        {
            propertyValue ??= propertyContainer.GetPropertyValue(Property, SearchOptions) !;

            if (propertyValue.IsNullOrNotDefined())
            {
                yield return(this.GetConfiguredMessage(propertyValue, propertyContainer));
            }
        }