public override CodeLocation GetCodeLocation() { CodeLocation location = DebugSymbolUtils.GetSourceLocation(Target); if (location == CodeLocation.Unknown) { location = Assembly.GetCodeLocation(); } return(location); }
private CodeLocation GetMethodSourceLocation(MethodDefinition methodDefinition) { if (symbolResolver == null) { symbolResolver = DebugSymbolUtils.CreateResolver(); } var assemblyPath = assemblyResolver.GetAssemblyPath(methodDefinition.DeclaringType.Module.Assembly); var metadataToken = (int)methodDefinition.MetadataToken.ToUInt32(); return(symbolResolver.GetSourceLocationForMethod(assemblyPath, metadataToken)); }