/// <summary> /// Load the SourceFileMap for a given PDB. If no map exists, null is returned. /// </summary> /// <param name="pdbPath">Path to PDB to map</param> /// <returns>SourceFileMap for PDB, or null if not previously mapped.</returns> public static SourceFileMap Load(string pdbPath) { SourceFileMap map = new SourceFileMap(pdbPath); if (File.Exists(map.FileMapPath)) { map.Load(); return(map); } return(null); }
/// <summary> /// Create or Load a SourceFileMap for the given PDB. When created, the map is /// serialized out for quick reloading later. /// </summary> /// <param name="pdbPath">Path to PDB to map</param> /// <returns>SourceFileMap for PDB</returns> public static SourceFileMap BuildOrLoad(string pdbPath) { SourceFileMap map = new SourceFileMap(pdbPath); if (File.Exists(map.FileMapPath)) { map.Load(); } else { map.Build(); map.Save(); } return(map); }