示例#1
0
 /// <summary>
 /// Creates a new <see cref="SymbolReader"/> instance
 /// </summary>
 /// <param name="mdStream">.NET metadata stream which is now owned by this method</param>
 /// <param name="pdbFileName">Path to PDB file</param>
 /// <returns>A new <see cref="SymbolReader"/> instance or <c>null</c> if there's no PDB
 /// file on disk or if any of the COM methods fail.</returns>
 public static SymbolReader Create(IImageStream mdStream, string pdbFileName)
 {
     try {
         return(Create(mdStream, ImageStreamUtils.OpenImageStream(pdbFileName)));
     }
     catch {
         if (mdStream != null)
         {
             mdStream.Dispose();
         }
         throw;
     }
 }
示例#2
0
        /// <summary>
        /// Creates a new <see cref="SymbolReader"/> instance
        /// </summary>
        /// <param name="metaData">.NET metadata</param>
        /// <param name="pdbFileName">Path to PDB file</param>
        /// <returns>A new <see cref="SymbolReader"/> instance or <c>null</c> if there's no PDB
        /// file on disk or if any of the COM methods fail.</returns>
        public static SymbolReader Create(IMetaData metaData, string pdbFileName)
        {
            var mdStream = CreateMetaDataStream(metaData);

            try {
                return(Create(mdStream, ImageStreamUtils.OpenImageStream(pdbFileName)));
            }
            catch {
                if (mdStream != null)
                {
                    mdStream.Dispose();
                }
                throw;
            }
        }
示例#3
0
 /// <summary>
 /// Creates a new <see cref="SymbolReader"/> instance
 /// </summary>
 /// <param name="pdbFileName">Path to PDB file</param>
 /// <returns>A new <see cref="SymbolReader"/> instance or <c>null</c> if there's no PDB
 /// file on disk.</returns>
 public static SymbolReader Create(string pdbFileName)
 {
     return(Create(ImageStreamUtils.OpenImageStream(pdbFileName)));
 }