NServiceBus.TypeRouteSource.GenerateRoutes C# (CSharp) Method

GenerateRoutes() public method

public GenerateRoutes ( Conventions conventions ) : IEnumerable
conventions Conventions
return IEnumerable
        public IEnumerable<RouteTableEntry> GenerateRoutes(Conventions conventions)
        {
            if (!conventions.IsMessageType(messageType))
            {
                throw new Exception($"Cannot configure routing for type '{messageType.FullName}' because it is not considered a message. Message types have to either implement NServiceBus.IMessage interface or match a defined message convention.");
            }
            yield return new RouteTableEntry(messageType, route);
        }