PropertyInvalidException.ValidateNotEmpty<T> Method (ICollection<T>, String) |
Validate that the given property value must not be
null or an empty collection, 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)
Syntaxpublic static void ValidateNotEmpty<T>(
ICollection<T> value,
string propertyName
)
Public Shared Sub ValidateNotEmpty(Of T) (
value As ICollection(Of T),
propertyName As String
)
public:
generic<typename T>
static void ValidateNotEmpty(
ICollection<T>^ value,
String^ propertyName
)
static member ValidateNotEmpty :
value : ICollection<'T> *
propertyName : string -> unit
Parameters
- value
- Type: System.Collections.Generic.ICollection<T>
The property value. - propertyName
- Type: System.String
The name of the property.
Type Parameters
- T
- The type of items in the collection.
Exceptions
See Also