internal void GetCustomDebugInfos(SymbolMethodImpl symMethod, MethodDef method, CilBody body, IList <PdbCustomDebugInfo> result) { Debug.Assert(method.Module == module); PdbAsyncMethodSteppingInformationCustomDebugInfo asyncStepInfo; GetCustomDebugInfos(method.MDToken.ToInt32(), GenericParamContext.Create(method), result, method, body, out asyncStepInfo); if (asyncStepInfo != null) { var asyncMethod = TryCreateAsyncMethod(module, symMethod.KickoffMethod, asyncStepInfo.AsyncStepInfos, asyncStepInfo.CatchHandler); Debug.Assert(asyncMethod != null); if (asyncMethod != null) { result.Add(asyncMethod); } } else if (symMethod.KickoffMethod != 0) { var iteratorMethod = TryCreateIteratorMethod(module, symMethod.KickoffMethod); Debug.Assert(iteratorMethod != null); if (iteratorMethod != null) { result.Add(iteratorMethod); } } }
internal void GetCustomDebugInfos(SymbolMethodImpl symMethod, MethodDef method, CilBody body, IList <PdbCustomDebugInfo> result) { Debug.Assert(method.Module == module); GetCustomDebugInfos(method.MDToken.ToInt32(), GenericParamContext.Create(method), result, method, body, out var asyncStepInfo); if (!(asyncStepInfo is null)) { var asyncMethod = TryCreateAsyncMethod(module, symMethod.KickoffMethod, asyncStepInfo.AsyncStepInfos, asyncStepInfo.CatchHandler); Debug.Assert(!(asyncMethod is null)); if (!(asyncMethod is null)) { result.Add(asyncMethod); } }
public override SymbolMethod GetMethod(MethodDef method, int version) { var mdTable = pdbMetadata.TablesStream.MethodDebugInformationTable; uint methodRid = method.Rid; if (!mdTable.IsValidRID(methodRid)) { return(null); } var sequencePoints = ReadSequencePoints(methodRid) ?? Array2.Empty <SymbolSequencePoint>(); var gpContext = GenericParamContext.Create(method); var rootScope = ReadScope(methodRid, gpContext); var kickoffMethod = GetKickoffMethod(methodRid); var symbolMethod = new SymbolMethodImpl(this, method.MDToken.ToInt32(), rootScope, sequencePoints, kickoffMethod); rootScope.method = symbolMethod; return(symbolMethod); }