Skip to content

Commit

Permalink
Create DkmCustomUIVisualizerInfo instances with ExtensionPartId field (
Browse files Browse the repository at this point in the history
…#65730)

* Create DkmCustomUIVisualizerInfo instances with ExtensionPartId field

* Address Comments
  • Loading branch information
mpeyrotc authored Dec 7, 2022
1 parent c33f4c0 commit 8878c0e
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 8 deletions.
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
<MicrosoftVisualStudioCoreUtilityVersion>$(VisualStudioEditorPackagesVersion)</MicrosoftVisualStudioCoreUtilityVersion>
<MicrosoftVisualStudioDebuggerUIInterfacesVersion>17.4.0-beta.22368.1</MicrosoftVisualStudioDebuggerUIInterfacesVersion>
<MicrosoftVisualStudioDebuggerContractsVersion>17.4.0-beta.22368.1</MicrosoftVisualStudioDebuggerContractsVersion>
<MicrosoftVisualStudioDebuggerEngineimplementationVersion>17.0.1042805-preview</MicrosoftVisualStudioDebuggerEngineimplementationVersion>
<MicrosoftVisualStudioDebuggerMetadataimplementationVersion>17.0.1042805-preview</MicrosoftVisualStudioDebuggerMetadataimplementationVersion>
<MicrosoftVisualStudioDebuggerEngineimplementationVersion>17.5.1120201-preview</MicrosoftVisualStudioDebuggerEngineimplementationVersion>
<MicrosoftVisualStudioDebuggerMetadataimplementationVersion>17.5.1120201-preview</MicrosoftVisualStudioDebuggerMetadataimplementationVersion>
<MicrosoftVisualStudioDesignerInterfacesVersion>$(MicrosoftVisualStudioShellPackagesVersion)</MicrosoftVisualStudioDesignerInterfacesVersion>
<MicrosoftVisualStudioDiagnosticsMeasurementVersion>17.0.0-preview-1-30928-1112</MicrosoftVisualStudioDiagnosticsMeasurementVersion>
<MicrosoftVisualStudioDiagnosticsPerformanceProviderVersion>$(MicrosoftVisualStudioShellPackagesVersion)</MicrosoftVisualStudioDiagnosticsPerformanceProviderVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ public Q() { }
UISideVisualizerAssemblyName = typeP.Assembly.FullName,
UISideVisualizerAssemblyLocation = DkmClrCustomVisualizerAssemblyLocation.Unknown,
DebuggeeSideVisualizerTypeName = defaultDebuggeeSideVisualizerTypeName,
DebuggeeSideVisualizerAssemblyName = defaultDebuggeeSideVisualizerAssemblyName},
DebuggeeSideVisualizerAssemblyName = defaultDebuggeeSideVisualizerAssemblyName,
ExtensionPartId = Guid.Empty},
new DkmCustomUIVisualizerInfo { Id = 1, Description = "Q Visualizer", MenuName = "Q Visualizer", Metric = "ClrCustomVisualizerVSHost",
UISideVisualizerTypeName = typeQ.FullName,
UISideVisualizerAssemblyName = typeQ.Assembly.FullName,
UISideVisualizerAssemblyLocation = DkmClrCustomVisualizerAssemblyLocation.Unknown,
DebuggeeSideVisualizerTypeName = defaultDebuggeeSideVisualizerTypeName,
DebuggeeSideVisualizerAssemblyName = defaultDebuggeeSideVisualizerAssemblyName}
DebuggeeSideVisualizerAssemblyName = defaultDebuggeeSideVisualizerAssemblyName,
ExtensionPartId = Guid.Empty}
};

Verify(evalResult,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ internal static DkmCustomUIVisualizerInfo[] GetDebuggerCustomUIVisualizerInfo(th
visualizerAttribute.UISideVisualizerAssemblyName,
visualizerAttribute.UISideVisualizerAssemblyLocation,
visualizerAttribute.DebuggeeSideVisualizerTypeName,
visualizerAttribute.DebuggeeSideVisualizerAssemblyName));
visualizerAttribute.DebuggeeSideVisualizerAssemblyName,
visualizerAttribute.ExtensionPartId));
}

underlyingType = underlyingType.GetBaseTypeOrNull(appDomain, out type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ public class DkmClrDebuggerVisualizerAttribute : DkmClrEvalAttribute
/// <param name="debuggeeSideVisualizerTypeName">[Required] The full name of the debuggee-side visualizer type</param>
/// <param name="debuggeeSideVisualizerAssemblyName">[Required] The full name of the debuggee-side visualizer assembly</param>
/// <param name="visualizerDescription">[Required] The visualizer description</param>
/// <param name="extensionPartId">[Required] This is a unique id for visualizers that are installed via the ExtensionPartManager.</param>
internal DkmClrDebuggerVisualizerAttribute(string targetMember,
string uiSideVisualizerTypeName,
string uiSideVisualizerAssemblyName,
DkmClrCustomVisualizerAssemblyLocation uiSideVisualizerAssemblyLocation,
string debuggeeSideVisualizerTypeName,
string debuggeeSideVisualizerAssemblyName,
string visualizerDescription) :
string visualizerDescription,
System.Guid extensionPartId) :
base(null)
{
UISideVisualizerTypeName = uiSideVisualizerTypeName;
Expand All @@ -40,6 +42,7 @@ internal DkmClrDebuggerVisualizerAttribute(string targetMember,
DebuggeeSideVisualizerTypeName = debuggeeSideVisualizerTypeName;
DebuggeeSideVisualizerAssemblyName = debuggeeSideVisualizerAssemblyName;
VisualizerDescription = visualizerDescription;
ExtensionPartId = extensionPartId;
}

public readonly string UISideVisualizerTypeName;
Expand All @@ -48,6 +51,7 @@ internal DkmClrDebuggerVisualizerAttribute(string targetMember,
public readonly string DebuggeeSideVisualizerTypeName;
public readonly string DebuggeeSideVisualizerAssemblyName;
public readonly string VisualizerDescription;
public readonly System.Guid ExtensionPartId;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ private static DkmClrDebuggerVisualizerAttribute[] GetDebuggerVisualizerAttribut
uiSideVisualizerAssemblyLocation: Evaluation.DkmClrCustomVisualizerAssemblyLocation.Unknown,
debuggeeSideVisualizerTypeName: debuggeeSideVisualizerTypeName,
debuggeeSideVisualizerAssemblyName: debuggeeSideVisualizerAssemblyName,
visualizerDescription: visualizerDescription));
visualizerDescription: visualizerDescription,
extensionPartId: System.Guid.Empty));
}

return builder.ToArrayAndFree();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class DkmCustomUIVisualizerInfo
public DkmClrCustomVisualizerAssemblyLocation UISideVisualizerAssemblyLocation;
public string DebuggeeSideVisualizerTypeName;
public string DebuggeeSideVisualizerAssemblyName;
public Guid ExtensionPartId;

public static DkmCustomUIVisualizerInfo Create(uint Id, string MenuName, string Description, string Metric)
{
Expand Down Expand Up @@ -54,5 +55,31 @@ public static DkmCustomUIVisualizerInfo Create(uint Id,
DebuggeeSideVisualizerAssemblyName = DebuggeeSideVisualizerAssemblyName
};
}

public static DkmCustomUIVisualizerInfo Create(uint Id,
string MenuName,
string Description,
string Metric,
string UISideVisualizerTypeName,
string UISideVisualizerAssemblyName,
DkmClrCustomVisualizerAssemblyLocation UISideVisualizerAssemblyLocation,
string DebuggeeSideVisualizerTypeName,
string DebuggeeSideVisualizerAssemblyName,
Guid ExtensionPartId)
{
return new DkmCustomUIVisualizerInfo
{
Id = Id,
MenuName = MenuName,
Description = Description,
Metric = Metric,
UISideVisualizerTypeName = UISideVisualizerTypeName,
UISideVisualizerAssemblyName = UISideVisualizerAssemblyName,
UISideVisualizerAssemblyLocation = UISideVisualizerAssemblyLocation,
DebuggeeSideVisualizerTypeName = DebuggeeSideVisualizerTypeName,
DebuggeeSideVisualizerAssemblyName = DebuggeeSideVisualizerAssemblyName,
ExtensionPartId = ExtensionPartId
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ bool IEqualityComparer<DkmCustomUIVisualizerInfo>.Equals(DkmCustomUIVisualizerIn
x.UISideVisualizerAssemblyName == y.UISideVisualizerAssemblyName &&
x.UISideVisualizerAssemblyLocation == y.UISideVisualizerAssemblyLocation &&
x.DebuggeeSideVisualizerTypeName == y.DebuggeeSideVisualizerTypeName &&
x.DebuggeeSideVisualizerAssemblyName == y.DebuggeeSideVisualizerAssemblyName);
x.DebuggeeSideVisualizerAssemblyName == y.DebuggeeSideVisualizerAssemblyName &&
x.ExtensionPartId == y.ExtensionPartId);
}

int IEqualityComparer<DkmCustomUIVisualizerInfo>.GetHashCode(DkmCustomUIVisualizerInfo obj)
Expand Down

0 comments on commit 8878c0e

Please sign in to comment.