public static Destination ConvertToDestination()

in src/main/csharp/Commands/Destination.cs [211:255]


        public static Destination ConvertToDestination(String text)
        {
            if(text == null)
            {
                return null;
            }

            int type = Destination.STOMP_QUEUE;
            string lowertext = text.ToLower();
            bool remote = false;

            if(lowertext.StartsWith("/queue/"))
            {
                text = text.Substring("/queue/".Length);
            }
            else if(lowertext.StartsWith("/topic/"))
            {
                text = text.Substring("/topic/".Length);
                type = Destination.STOMP_TOPIC;
            }
            else if(lowertext.StartsWith("/temp-topic/"))
            {
                text = text.Substring("/temp-topic/".Length);
                type = Destination.STOMP_TEMPORARY_TOPIC;
            }
            else if(lowertext.StartsWith("/temp-queue/"))
            {
                text = text.Substring("/temp-queue/".Length);
                type = Destination.STOMP_TEMPORARY_QUEUE;
            }
            else if(lowertext.StartsWith("/remote-temp-topic/"))
            {
                text = text.Substring("/remote-temp-topic/".Length);
                type = Destination.STOMP_TEMPORARY_TOPIC;
                remote = true;
            }
            else if(lowertext.StartsWith("/remote-temp-queue/"))
            {
                text = text.Substring("/remote-temp-queue/".Length);
                type = Destination.STOMP_TEMPORARY_QUEUE;
                remote = true;
            }

            return Destination.CreateDestination(type, text, remote);
        }