26 references to Contracts
Microsoft.ML.DataView (26)
KeyDataViewType.cs (3)
51throw Contracts.ExceptParam(nameof(type), $"Type is not valid, it must be {typeof(byte).Name}, {typeof(ushort).Name}, {typeof(uint).Name}, or {typeof(ulong).Name}."); 53throw Contracts.ExceptParam(nameof(count), $"The cardinality of a {nameof(KeyDataViewType)} must not exceed {type.Name}.{nameof(uint.MaxValue)} " + 76Contracts.CheckParam(0 < count, nameof(count), "The cardinality of a " + nameof(KeyDataViewType) + " must be strictly positive.");
VBuffer.cs (16)
117Contracts.CheckParam(length >= 0, nameof(length)); 118Contracts.CheckParam(ArrayUtils.Size(values) >= length, nameof(values)); 144Contracts.CheckParam(length >= 0, nameof(length)); 145Contracts.CheckParam(0 <= count && count <= length, nameof(count)); 146Contracts.CheckParam(ArrayUtils.Size(values) >= count, nameof(values)); 147Contracts.CheckParam(count == length || ArrayUtils.Size(indices) >= count, nameof(indices)); 225Contracts.CheckParam(0 <= sourceIndex && sourceIndex <= Length, nameof(sourceIndex)); 226Contracts.CheckParam(0 <= length && sourceIndex <= Length - length, nameof(length)); 287Contracts.CheckParam(0 <= destinationIndex && destinationIndex <= destination.Length - Length, 323Contracts.CheckParam(0 <= length && length <= ArrayUtils.Size(source), nameof(length)); 324Contracts.CheckParam(0 <= sourceIndex && sourceIndex <= ArrayUtils.Size(source) - length, nameof(sourceIndex)); 376Contracts.CheckParam(0 <= index && index < Length, nameof(index)); 395Contracts.CheckParam(0 <= index && index < Length, nameof(index)); 427Contracts.CheckParam(newLogicalLength >= 0, nameof(newLogicalLength), "Must be non-negative."); 428Contracts.CheckParam(valuesCount == null || valuesCount.Value >= 0, nameof(valuesCount), 430Contracts.CheckParam(valuesCount == null || valuesCount.Value <= newLogicalLength, nameof(valuesCount),
VBufferEditor.cs (1)
159Contracts.CheckParam(physicalValuesCount <= Values.Length, nameof(physicalValuesCount),
VectorType.cs (6)
45Contracts.CheckParam(size >= 0, nameof(size)); 62Contracts.CheckParam(ArrayUtils.Size(dimensions) > 0, nameof(dimensions)); 63Contracts.CheckParam(dimensions.All(d => d >= 0), nameof(dimensions)); 80Contracts.CheckParam(dimensions.Length > 0, nameof(dimensions)); 81Contracts.CheckParam(dimensions.All(d => d >= 0), nameof(dimensions)); 90Contracts.CheckValue(itemType, nameof(itemType));