I've got an IClaimsPrincipal
variable, and I'd like to see how many claims are in it. Navigating through the properties in the watch window is complicated, so I'd like to customize how this object is displayed.
I'm aware of the [DebuggerTypeProxy]
attribute, which initially looked like it might do what I want. Unfortunately, it needs to be attached to the class, and I don't "own" the class. In this case it's a Microsoft.IdentityModel.Claims.ClaimsPrincipal
.
I'd like to display the value of IClaimsPrincipal.Identities[0].Claims.Count
.
Is there any way, using [DebuggerTypeProxy]
or similar, to customize how the value of a type that I don't own is displayed in the watch window?