Apache.NMS.ActiveMQ.Commands.ActiveMQDestination.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : String
return String
        public override String ToString()
        {
            switch(DestinationType)
            {
            case DestinationType.Topic:
            return "topic://" + PhysicalName;

            case DestinationType.TemporaryTopic:
            return "temp-topic://" + PhysicalName;

            case DestinationType.TemporaryQueue:
            return "temp-queue://" + PhysicalName;

            default:
            return "queue://" + PhysicalName;
            }
        }

Usage Example

Beispiel #1
0
 /**
  * A helper method to return a descriptive string for the topic or queue
  * @param destination
  *
  * @return a descriptive string for this queue or topic
  */
 public static String Inspect(ActiveMQDestination destination)
 {
     if (destination is ITopic)
     {
         return("Topic(" + destination.ToString() + ")");
     }
     else
     {
         return("Queue(" + destination.ToString() + ")");
     }
 }
All Usage Examples Of Apache.NMS.ActiveMQ.Commands.ActiveMQDestination::ToString