Пример #1
0
 public static DataSourceStandard <NullableCollectionDataContainerFactory <NullableRequiredCollectionStateValidator <TValue>, TValue, TValue>, Option <TValue[]>, TValue[], UniqueValidator <TValue> > Unique <TValue>(this NullableRequiredCollectionStateValidator <TValue> source)
 => source.Add(new UniqueValidator <TValue>());
Пример #2
0
 public static DataSourceStandard <NullableCollectionDataContainerFactory <NullableRequiredCollectionStateValidator <TValue>, TValue, TValue>, Option <TValue[]>, TValue[], ItemCountValidator <TValue> > ItemCount <TValue>(this NullableRequiredCollectionStateValidator <TValue> source, int?minimumItems = null, int?maximumItems = null)
 => source.Add(new ItemCountValidator <TValue>(minimumItems, maximumItems));
Пример #3
0
 public static DataSourceStandard <NullableCollectionDataContainerFactory <NullableRequiredCollectionStateValidator <TValue>, TValue, TValue>, Option <TValue[]>, TValue[], CustomValidator <TValue[]> > Assert <TValue>(this NullableRequiredCollectionStateValidator <TValue> source, string description, Func <TValue[], bool> validator)
 => source.Add(new CustomValidator <TValue[]>(description, validator));