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

Equals() public method

if the object passed in is equivalent, return true
public Equals ( Object obj ) : bool
obj Object the object to compare
return bool
        public override bool Equals(Object obj)
        {
            bool result = this == obj;
            if(!result && obj != null && obj is ActiveMQDestination)
            {
                ActiveMQDestination other = (ActiveMQDestination) obj;
                result = this.GetDestinationType() == other.GetDestinationType()
                    && this.physicalName.Equals(other.physicalName);
            }
            return result;
        }

Usage Example

Beispiel #1
0
 public static bool IsConnectionAdvisoryTopic(ActiveMQDestination destination) {
     if (destination.IsComposite)
     {
         ActiveMQDestination[] compositeDestinations = destination.GetCompositeDestinations();
         for (int i = 0; i < compositeDestinations.Length; i++)
         {
             if (IsConnectionAdvisoryTopic(compositeDestinations[i]))
             {
                 return true;
             }
         }
         return false;
     }
     else
     {
         return destination.Equals(CONNECTION_ADVISORY_TOPIC);
     }
 }