예제 #1
0
 public static int Of(IMethodDefinition method, PdbReader pdb)
 {
     if (pdb != null)
     {
         if (pdb.IsIterator(method.Body)) return -1;
         var locations = method.LocatedOperations(pdb);
         return locations.DifferenceBetweenStartAndEndlines();
     }
     return -1;
 }
예제 #2
0
 public static int Of(IMethodDefinition method, PdbReader pdb)
 {
     if (pdb != null)
     {
         if (pdb.IsIterator(method.Body)) return -1;
         var locations = method.LocatedOperations(pdb);
         return locations.GetAllStartLinesOfInterestingOpCodes().Distinct().Count();
     }
     return -1;
 }