internal static Microsoft.ServiceBus.ListenerType MapRelayTypeToListenerType(Microsoft.ServiceBus.RelayType?relayType)
        {
            if (!relayType.HasValue)
            {
                return(Microsoft.ServiceBus.ListenerType.None);
            }
            Microsoft.ServiceBus.RelayType valueOrDefault = relayType.GetValueOrDefault();
            if (relayType.HasValue)
            {
                switch (valueOrDefault)
                {
                case Microsoft.ServiceBus.RelayType.NetTcp:
                {
                    return(Microsoft.ServiceBus.ListenerType.RelayedConnection);
                }

                case Microsoft.ServiceBus.RelayType.Http:
                {
                    return(Microsoft.ServiceBus.ListenerType.RelayedHttp);
                }

                case Microsoft.ServiceBus.RelayType.NetEvent:
                {
                    return(Microsoft.ServiceBus.ListenerType.Multicast);
                }

                case Microsoft.ServiceBus.RelayType.NetOneway:
                {
                    return(Microsoft.ServiceBus.ListenerType.Unicast);
                }
                }
            }
            return(Microsoft.ServiceBus.ListenerType.None);
        }
 public RelayDescription(string relayPath, Microsoft.ServiceBus.RelayType type)
 {
     this.Path      = relayPath;
     this.RelayType = type;
 }