public static string SubstituteId(this object substitute, DiagContextInternal ctx)
        {
            string proxyType = "";

            if (ctx.TryGetSubstitutePrimaryType(substitute, out Type primaryType))
            {
                proxyType = $".{primaryType.DiagName()}";
            }

            return($"Substitute{proxyType}|{RuntimeHelpers.GetHashCode(substitute):x8}");
        }