48 references to CheckDecode
Microsoft.ML.Core (47)
Data\ModelHeader.cs (31)
326Contracts.CheckDecode(headerBytes.Length == ModelHeader.Size); 342Contracts.CheckDecode(header.FpModel + header.CbModel == reader.FpCur() - fpMin); 398Contracts.CheckDecode(header.FpModel == Size); 399Contracts.CheckDecode(header.FpModel + header.CbModel >= header.FpModel); 404Contracts.CheckDecode(header.CbStringTable == 0); 405Contracts.CheckDecode(header.FpStringChars == 0); 406Contracts.CheckDecode(header.CbStringChars == 0); 409Contracts.CheckDecode(header.FpTail == header.FpModel + header.CbModel); 415Contracts.CheckDecode(header.FpStringTable == header.FpModel + header.CbModel); 416Contracts.CheckDecode(header.CbStringTable % sizeof(long) == 0); 417Contracts.CheckDecode(header.CbStringTable / sizeof(long) < int.MaxValue); 418Contracts.CheckDecode(header.FpStringTable + header.CbStringTable > header.FpStringTable); 419Contracts.CheckDecode(header.FpStringChars == header.FpStringTable + header.CbStringTable); 420Contracts.CheckDecode(header.CbStringChars % sizeof(char) == 0); 421Contracts.CheckDecode(header.FpStringChars + header.CbStringChars >= header.FpStringChars); 424Contracts.CheckDecode(header.FpTail == header.FpStringChars + header.CbStringChars); 432Contracts.CheckDecode(header.CbAssemblyName == 0); 439Contracts.CheckDecode(header.FpAssemblyName == header.FpModel + header.CbModel); 443Contracts.CheckDecode(header.FpAssemblyName == header.FpStringChars + header.CbStringChars); 445Contracts.CheckDecode(header.CbAssemblyName % sizeof(char) == 0); 446Contracts.CheckDecode(header.FpTail == header.FpAssemblyName + header.CbAssemblyName); 450Contracts.CheckDecode(header.FpLim == header.FpTail + sizeof(ulong)); 451Contracts.CheckDecode(size == 0 || size >= header.FpLim); 509Contracts.CheckDecode(offsets[cstr - 1] == header.CbStringChars); 516Contracts.CheckDecode(header.FpStringChars + offset == reader.FpCur() - fpMin); 520Contracts.CheckDecode(offsetPrev <= offset && offset <= header.CbStringChars); 521Contracts.CheckDecode(offset % sizeof(char) == 0); 523Contracts.CheckDecode(cch < int.MaxValue); 530Contracts.CheckDecode(offset == header.CbStringChars); 531Contracts.CheckDecode(header.FpStringChars + header.CbStringChars == reader.FpCur() - fpMin); 551Contracts.CheckDecode(header.FpTail == reader.FpCur() - fpMin);
Data\ModelLoadContext.cs (1)
153Contracts.CheckDecode(0 <= id && id < Utils.Size(Strings));
Utilities\Stream.cs (15)
458Contracts.CheckDecode(b <= 1); 472Contracts.CheckDecode(size >= 0); 536Contracts.CheckDecode(size >= 0); 573Contracts.CheckDecode(size >= 0); 610Contracts.CheckDecode(size >= 0); 648Contracts.CheckDecode(size >= 0); 686Contracts.CheckDecode(size >= 0); 724Contracts.CheckDecode(size >= 0); 743Contracts.CheckDecode(b <= 1); 755Contracts.CheckDecode(*((byte*)dst + i) <= 1); 768Contracts.CheckDecode(size >= 0); 806Contracts.CheckDecode(size >= 0); 818Contracts.CheckDecode(bytes.Length == size); 825Contracts.CheckDecode(numBits >= 0); 855Contracts.CheckDecode(read == toRead);
Microsoft.ML.Data (1)
DataLoadSave\Transpose\TransposeLoader.cs (1)
202/// should be handle with <see cref="Contracts.CheckDecode(bool)"/> or by throwing