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); }
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); }