Пример #1
0
        internal CustomDebugInformation(MetadataReader reader, CustomDebugInformationHandle handle)
        {
            Debug.Assert(reader != null);
            Debug.Assert(!handle.IsNil);

            _reader = reader;
            _rowId = handle.RowId;
        }
 public CustomDebugInformationEntry(PEFile module, MetadataReader metadata, bool isEmbedded, CustomDebugInformationHandle handle)
 {
     this.offset = isEmbedded ? null : (int?)metadata.GetTableMetadataOffset(TableIndex.CustomDebugInformation)
                   + metadata.GetTableRowSize(TableIndex.CustomDebugInformation) * (MetadataTokens.GetRowNumber(handle) - 1);
     this.module    = module;
     this.metadata  = metadata;
     this.handle    = handle;
     this.debugInfo = metadata.GetCustomDebugInformation(handle);
 }
Пример #3
0
        internal BlobHandle GetValue(CustomDebugInformationHandle handle)
        {
            int rowOffset = (handle.RowId - 1) * RowSize;

            return(BlobHandle.FromOffset(Block.PeekHeapReference(rowOffset + _valueOffset, _isBlobHeapRefSizeSmall)));
        }
Пример #4
0
        internal GuidHandle GetKind(CustomDebugInformationHandle handle)
        {
            int rowOffset = (handle.RowId - 1) * RowSize;

            return(GuidHandle.FromIndex(Block.PeekHeapReference(rowOffset + _kindOffset, _isGuidHeapRefSizeSmall)));
        }
Пример #5
0
        internal EntityHandle GetParent(CustomDebugInformationHandle handle)
        {
            int rowOffset = (handle.RowId - 1) * RowSize;

            return(HasCustomDebugInformationTag.ConvertToHandle(Block.PeekTaggedReference(rowOffset + ParentOffset, _isHasCustomDebugInformationRefSizeSmall)));
        }
Пример #6
0
 public CustomDebugInformation GetCustomDebugInformation(CustomDebugInformationHandle handle)
 {
     return new CustomDebugInformation(this, handle);
 }
Пример #7
0
 internal BlobHandle GetValue(CustomDebugInformationHandle handle)
 {
     int rowOffset = (handle.RowId - 1) * RowSize;
     return BlobHandle.FromOffset(Block.PeekHeapReference(rowOffset + _valueOffset, _isBlobHeapRefSizeSmall));
 }
Пример #8
0
 internal GuidHandle GetKind(CustomDebugInformationHandle handle)
 {
     int rowOffset = (handle.RowId - 1) * RowSize;
     return GuidHandle.FromIndex(Block.PeekHeapReference(rowOffset + _kindOffset, _isGuidHeapRefSizeSmall));
 }
Пример #9
0
 internal EntityHandle GetParent(CustomDebugInformationHandle handle)
 {
     int rowOffset = (handle.RowId - 1) * RowSize;
     return HasCustomDebugInformationTag.ConvertToHandle(Block.PeekTaggedReference(rowOffset + ParentOffset, _isHasCustomDebugInformationRefSizeSmall));
 }
Пример #10
0
 public static CustomDebugInformation GetCustomDebugInformation(this CustomDebugInformationHandle handle, MetadataReader reader) => reader.GetCustomDebugInformation(handle);