private static IDestination CreateDestination()

in src/NMS.AMQP/Util/AmqpDestinationHelper.cs [175:199]


        private static IDestination CreateDestination(string address, IDestination consumerDestination, bool useConsumerDestForTypeOnly)
        {
            if (address == null)
            {
                return useConsumerDestForTypeOnly ? null : consumerDestination;
            }

            if (consumerDestination.IsQueue)
            {
                if (consumerDestination.IsTemporary)
                    return new NmsTemporaryQueue(address);
                else
                    return new NmsQueue(address);
            }
            else if (consumerDestination.IsTopic)
            {
                if (consumerDestination.IsTemporary)
                    return new NmsTemporaryTopic(address);
                else
                    return new NmsTopic(address);
            }

            // fall back to a Queue Destination since we need a real NMS destination
            return new NmsQueue(address);
        }