Mercurial > hg > tc-symbol-server
view jet-symbols/src/JetBrains.CommandLine.Symbols/DumpBinaryFileSignCommand.cs @ 103:9ff982a9213e
report full pdb file path instead of file name when collecting pdb signatures
author | Evgeniy.Koshkin@unit-519.Labs.IntelliJ.Net |
---|---|
date | Mon, 16 May 2016 19:43:39 +0300 |
parents | 0e927b14ccf1 |
children |
line wrap: on
line source
// Decompiled with JetBrains decompiler // Type: JetBrains.CommandLine.Symbols.DumpBinaryFileSignCommand // Assembly: JetBrains.CommandLine.Symbols, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325 // MVID: EF046BF6-60AC-48EA-9121-8AF3D8D08853 // Assembly location: C:\Data\Work\TeamCity\misc\tc-symbol-server\tools\JetSymbols\JetBrains.CommandLine.Symbols.exe using JetBrains.Metadata.Utils; using JetBrains.Metadata.Utils.PE; using JetBrains.Util; using System; using System.Collections.Generic; using System.IO; namespace JetBrains.CommandLine.Symbols { public class DumpBinaryFileSignCommand : DumpFilesSignCommandBase { public const string CMD_NAME = "dumpBinSign"; public DumpBinaryFileSignCommand(FileSystemPath outputFilePath, IEnumerable<FileSystemPath> targetFilePaths) : base(outputFilePath, targetFilePaths) { } protected override string GetFileSignature(FileSystemPath targetFilePath) { try { using (Stream stream = targetFilePath.OpenFileForReading()) { PEFile peFile = new PEFile((IBinaryReader) new StreamBinaryReader(stream)); return string.Format("{0:X}{1:X}", (object) peFile.COFFheader.TimeStamp, (object) peFile.NTHeader.ImageSize); } } catch (Exception ex) { Console.Error.WriteLine(ex.Message); return (string) null; } } } }