示例#1
0
        internal MethodDebugInformation(MetadataReader reader, MethodDebugInformationHandle handle)
        {
            Debug.Assert(reader != null);
            Debug.Assert(!handle.IsNil);

            _reader = reader;
            _rowId = handle.RowId;
        }
示例#2
0
        private SourceInformation GetSourceInformation(MethodDebugInformationHandle handle)
        {
            SourceInformation sourceInformation = null;
            try
            {
                var methodDebugDefinition = _reader.GetMethodDebugInformation(handle);
                var fileName = GetMethodFileName(methodDebugDefinition);
                var lineNumber = GetMethodStartLineNumber(methodDebugDefinition);

                sourceInformation = new SourceInformation(fileName, lineNumber);
            }
            catch (BadImageFormatException)
            {
            }

            return sourceInformation;
        }
示例#3
0
 public LocalScopeHandleCollection GetLocalScopes(MethodDebugInformationHandle handle)
 {
     return new LocalScopeHandleCollection(this, handle.RowId);
 }
示例#4
0
 public MethodDebugInformation GetMethodDebugInformation(MethodDebugInformationHandle handle)
 {
     return new MethodDebugInformation(this, handle);
 }
示例#5
0
 internal DocumentHandle GetDocument(MethodDebugInformationHandle handle)
 {
     int rowOffset = (handle.RowId - 1) * RowSize;
     return DocumentHandle.FromRowId(Block.PeekReference(rowOffset + DocumentOffset, _isDocumentRefSmall));
 }
示例#6
0
 internal BlobHandle GetSequencePoints(MethodDebugInformationHandle handle)
 {
     int rowOffset = (handle.RowId - 1) * RowSize;
     return BlobHandle.FromOffset(Block.PeekHeapReference(rowOffset + _sequencePointsOffset, _isBlobHeapRefSizeSmall));
 }