Пример #1
0
        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);
        }
Пример #2
0
 public RelayDescription(string relayPath, Microsoft.ServiceBus.RelayType type)
 {
     this.Path      = relayPath;
     this.RelayType = type;
 }