public static string DiagName(this ICallRouter callRouter, DiagContextInternal ctx) { var name = $"<{callRouter.GetObjectId(ctx)}"; if (ctx.TryGetSubstituteForRouter(callRouter, out object substitute)) { name += $"#{substitute.SubstituteId(ctx)}"; } return($"{name}>"); }