public void Describe(JasperRuntime runtime, TextWriter writer) { var settings = runtime.Get <JasperOptions>(); var transports = runtime.Get <ITransport[]>() .Where(x => settings.StateFor(x.Protocol) == TransportState.Enabled); foreach (var transport in transports) { transport.Describe(writer); } writer.WriteLine(); foreach (var channel in Subscribers.AllKnown()) { writer.WriteLine($"Active sending agent to {channel.Uri}"); } if (Graph.Chains.Any()) { writer.WriteLine("Handles messages:"); var longestMessageName = Graph.Chains.Select(x => x.MessageType.NameInCode().Length).Max() + 2; foreach (var chain in Graph.Chains) { var messageName = chain.MessageType.NameInCode().PadLeft(longestMessageName); var handlers = chain.Handlers.Select(x => x.ToString()).Join(", "); writer.WriteLine($"{messageName}: {handlers}"); } } writer.WriteLine(); }