private DocumentHandle ReadDocumentHandle()
            {
                int rowId = _reader.ReadCompressedInteger();
                if (rowId == 0 || !TokenTypeIds.IsValidRowId(rowId))
                {
                    Throw.InvalidHandle();
                }

                return DocumentHandle.FromRowId(rowId);
            }
예제 #2
0
        // When reference has at most 24 bits.
        internal int PeekReference(int offset, bool smallRefSize)
        {
            if (smallRefSize)
            {
                return(PeekUInt16(offset));
            }

            uint value = PeekUInt32(offset);

            if (!TokenTypeIds.IsValidRowId(value))
            {
                Throw.ReferenceOverflow();
            }

            return((int)value);
        }
예제 #3
0
 private MethodDebugInformationHandle(int rowId)
 {
     Debug.Assert(TokenTypeIds.IsValidRowId(rowId));
     _rowId = rowId;
 }
예제 #4
0
 private DocumentHandle(int rowId)
 {
     Debug.Assert(TokenTypeIds.IsValidRowId(rowId));
     _rowId = rowId;
 }
예제 #5
0
 private ImportScopeHandle(int rowId)
 {
     Debug.Assert(TokenTypeIds.IsValidRowId(rowId));
     _rowId = rowId;
 }
예제 #6
0
 private LocalConstantHandle(int rowId)
 {
     Debug.Assert(TokenTypeIds.IsValidRowId(rowId));
     _rowId = rowId;
 }
예제 #7
0
 private LocalVariableHandle(int rowId)
 {
     Debug.Assert(TokenTypeIds.IsValidRowId(rowId));
     _rowId = rowId;
 }