From 63c67871aa4d957cb48c6d3b3aba1efef599a964 Mon Sep 17 00:00:00 2001 From: David Hall Date: Mon, 8 Jul 2019 11:37:32 -0600 Subject: [PATCH] Added DebuggerDisplayAttribute for all classes to show pointer and string values. --- Core/InteropServices/StrPtr.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/InteropServices/StrPtr.cs b/Core/InteropServices/StrPtr.cs index ba54a0c3..0cb61849 100644 --- a/Core/InteropServices/StrPtr.cs +++ b/Core/InteropServices/StrPtr.cs @@ -1,11 +1,12 @@ using System; +using System.Diagnostics; using System.Runtime.InteropServices; using Vanara.Extensions; namespace Vanara.InteropServices { /// The StrPtr structure represents a LPTSTR. - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential), DebuggerDisplay("{ptr}, {ToString()}")] public struct StrPtrAuto { private IntPtr ptr; @@ -84,7 +85,7 @@ namespace Vanara.InteropServices } /// The StrPtr structure represents a LPWSTR. - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential), DebuggerDisplay("{ptr}, {ToString()}")] public struct StrPtrUni { private IntPtr ptr; @@ -159,7 +160,7 @@ namespace Vanara.InteropServices } /// The StrPtr structure represents a LPWSTR. - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential), DebuggerDisplay("{ptr}, {ToString()}")] public struct StrPtrAnsi { private IntPtr ptr; @@ -234,7 +235,7 @@ namespace Vanara.InteropServices } /// The GuidPtr structure represents a LPGUID. - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential), DebuggerDisplay("{ptr}, {ToString()}")] public struct GuidPtr { private IntPtr ptr;