Click or drag to resize

PropertyInvalidException.ValidateNotEmpty<TKey, TValue> Method (IDictionary<TKey, TValue>, String)

Validate that the given property value must not be null or an empty dictionary, and throw PropertyInvalidException if it is.

Namespace:  AGI.Foundation
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public static void ValidateNotEmpty<TKey, TValue>(
	IDictionary<TKey, TValue> value,
	string propertyName
)

Parameters

value
Type: System.Collections.Generic.IDictionary<TKey, TValue>
The property value.
propertyName
Type: System.String
The name of the property.

Type Parameters

TKey
The type of keys in the dictionary.
TValue
The type of values in the dictionary.
Exceptions
ExceptionCondition
PropertyInvalidException Thrown if value is empty.
See Also