private void assertNoUnknownTransportsInSubscribers(BusSettings settings) { var unknowns = settings.KnownSubscribers.Where(x => !ValidTransports.Contains(x.Uri.Scheme)).ToArray(); if (unknowns.Length > 0) { throw new UnknownTransportException( $"Unknown transports referenced in {unknowns.Select(x => x.Uri.ToString()).Join(", ")}"); } }
private void assertNoUnknownTransportsInListeners(BusSettings settings) { var unknowns = settings.Listeners.Where(x => !ValidTransports.Contains(x.Scheme)).ToArray(); if (unknowns.Any()) { throw new UnknownTransportException( $"Unknown transports referenced in listeners: {unknowns.Select(x => x.ToString()).Join(", ")}"); } }