예제 #1
0
 /// <summary>
 /// Reads custom debug info
 /// </summary>
 /// <param name="method">Method</param>
 /// <param name="body">The method's body. Needs to be provided by the caller since we're called from
 /// PDB-init code when the Body property hasn't been initialized yet</param>
 /// <param name="result">Place all custom debug info in this list</param>
 /// <param name="data">Custom debug info from the PDB file</param>
 public static void Read(MethodDef method, CilBody body, IList <PdbCustomDebugInfo> result, byte[] data)
 {
     try {
         using (var reader = new PdbCustomDebugInfoReader(method, body, MemoryImageStream.Create(data)))
             reader.Read(result);
     }
     catch (ArgumentException) {
     }
     catch (OutOfMemoryException) {
     }
     catch (IOException) {
     }
 }
예제 #2
0
 /// <summary>
 /// Reads custom debug info
 /// </summary>
 /// <param name="method">Method</param>
 /// <param name="body">The method's body. Needs to be provided by the caller since we're called from
 /// PDB-init code when the Body property hasn't been initialized yet</param>
 /// <param name="result">Place all custom debug info in this list</param>
 /// <param name="data">Custom debug info from the PDB file</param>
 public static void Read(MethodDef method, CilBody body, IList <PdbCustomDebugInfo> result, byte[] data)
 {
     try {
         var reader    = ByteArrayDataReaderFactory.CreateReader(data);
         var cdiReader = new PdbCustomDebugInfoReader(method, body, ref reader);
         cdiReader.Read(result);
     }
     catch (ArgumentException) {
     }
     catch (OutOfMemoryException) {
     }
     catch (IOException) {
     }
 }