private void LogConnectionWriteList(ILogger logger, out long?timestamp) { timestamp = null; using (logger.BeginScope("m_WriteList")) { foreach (var webRequestProxy in TargetObject.GetWriteListItems()) { timestamp = webRequestProxy.StartTimestamp; var httpWebRequestAnalyzer = new HttpWebRequestAnalyzer(Context, webRequestProxy); httpWebRequestAnalyzer.Dump(logger); // runtime.Heap.EnumerateObjects().First().EnumerateObjectReferences( // ) // foreach (var requestStateObject in GetAllReferencesTo(runtime, elAddress, "System.Net.Http.HttpClientHandler+RequestState")) // { // var taskObject = requestStateObject.GetObjectField("tcs") // .GetObjectField("m_task"); // // var taskIsCompelted = TaskObjectTypeExtensions.TaskIsCompelted(taskObject.Address, taskObject.Type); // logger.LogInformation($" taskIsCompelted = {taskIsCompelted}"); // //// foreach (var o in GetAllReferencesTo(runtime, taskObject.Address)) //// { //// logger.LogInformation(o); //// } // } // // var requestStateObject = GetAllReferencesTo(runtime, elAddress, "System.Net.Http.HttpClientHandler+RequestState").FirstOrDefault(); // var taskCompletionSourceObject = GetAllReferencesTo(runtime, requestStateObject.Address, "System.Threading.Tasks.TaskCompletionSource`1[[System.Net.Http.HttpResponseMessage, System.Net.Http]]") // .FirstOrDefault(); } } }