From ca47896204482bf4a6979e3838bf7f09f61cebeb Mon Sep 17 00:00:00 2001 From: giy <giy@omp-system.ru> Date: Fri, 02 Sep 2022 14:16:56 +0300 Subject: [PATCH] Обновление до версии 2.9.0 --- QtVsTools.Package/QML/Debugging/AD7/QmlDebugAD7StackFrame.cs | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/QtVsTools.Package/QML/Debugging/AD7/QmlDebugAD7StackFrame.cs b/QtVsTools.Package/QML/Debugging/AD7/QmlDebugAD7StackFrame.cs index 8578f60..cc80a67 100644 --- a/QtVsTools.Package/QML/Debugging/AD7/QmlDebugAD7StackFrame.cs +++ b/QtVsTools.Package/QML/Debugging/AD7/QmlDebugAD7StackFrame.cs @@ -32,6 +32,7 @@ using System.Threading.Tasks; using Microsoft.VisualStudio; using Microsoft.VisualStudio.Debugger.Interop; +using Microsoft.VisualStudio.Threading; namespace QtVsTools.Qml.Debug.AD7 { @@ -52,14 +53,14 @@ public Program Program { get; private set; } public CodeContext Context { get; private set; } - public Dictionary<int, Dictionary<string, Property>> Properties { get; private set; } + private Dictionary<int, Dictionary<string, Property>> Properties { get; set; } - public string Name { get; private set; } - public int FrameNumber { get; private set; } - public IEnumerable<int> Scopes { get; private set; } - public Task InitThread { get; private set; } + private string Name { get; set; } + public int FrameNumber { get; set; } + private IEnumerable<int> Scopes { get; set; } + private JoinableTask InitThread { get; set; } - static public StackFrame Create( + public static StackFrame Create( string name, int number, IEnumerable<int> scopes, @@ -85,7 +86,11 @@ Name = string.Format("{0}@{1}:{2}", name, context.FilePath, context.FileLine + 1); FrameNumber = number; Scopes = scopes; - InitThread = Task.Run(() => InitializeProperties()); + InitThread = QtVsToolsPackage.Instance.JoinableTaskFactory.RunAsync(async () => + { + InitializeProperties(); + await Task.Yield(); + }); return true; } @@ -134,7 +139,7 @@ if (guidFilter != Guid.Empty && !Property.Filter.LocalsSelected(ref guidFilter)) return VSConstants.S_OK; - InitThread.Wait(); + InitThread.Join(); pcelt = 0; ppEnum = PropertyEnum.Create(Properties .SelectMany(x => x.Value @@ -152,9 +157,8 @@ uint dwTimeout, out IEnumDebugPropertyInfo2 ppEnum) { - uint pcelt; return ((IDebugStackFrame2)this) - .EnumProperties(dwFields, dwRadix, guidFilter, dwTimeout, out pcelt, out ppEnum); + .EnumProperties(dwFields, dwRadix, guidFilter, dwTimeout, out _, out ppEnum); } #region //////////////////// Info ///////////////////////////////////////////////////////// -- Gitblit v1.9.1