public ClrmdHandle(ClrAppDomain parent, ulong address, ClrObject obj, ClrHandleKind kind) { if (kind == ClrHandleKind.Dependent) { throw new InvalidOperationException($"{nameof(ClrmdHandle)} cannot represent a dependent handle, use {nameof(ClrmdDependentHandle)} instead."); } if (kind == ClrHandleKind.RefCounted) { throw new InvalidOperationException($"{nameof(ClrmdHandle)} cannot represent a ref counted handle, use {nameof(ClrmdRefCountedHandle)} instead."); } AppDomain = parent; Address = address; Object = obj; HandleKind = kind; }
public static string GetName(this ClrHandleKind kind) => kind switch {