Ejemplo n.º 1
0
 public async Task ProcessSymbolFileAsync(IPackage package, string symbolFilePath, string symbolSourceUri)
 {
     if (IsPdbFile(symbolFilePath))
     {
         await MapSourcesAsync(package, symbolFilePath, symbolSourceUri);
     }
     await SymbolTools.IndexSymbolFile(package, symbolFilePath);
 }
Ejemplo n.º 2
0
        private async Task MapSourcesAsync(IPackage package, string symbolFilePath, string symbolSourceUri)
        {
            var referencedSources = (await SymbolTools.GetSources(symbolFilePath)).ToList();

            var sourceFiles = new HashSet <string>(package.GetFiles("src").Select(f => f.Path.Substring(4)));

            if (referencedSources.Any() && sourceFiles.Any())
            {
                var sourceMapper = new SymbolSourceMapper();
                var mappings     = sourceMapper.CreateSourceMappingIndex(package, symbolSourceUri, referencedSources, sourceFiles);

                await SymbolTools.MapSourcesAsync(symbolFilePath, mappings);
            }
        }