Пример #1
0
 public RemoteSubscriber(TSM tsm, IList <string> patterns, RegistrySubscriptionRequest request)
 {
     Tsm = tsm;
     _registryRequest = request;
     _patterns        = new HashSet <string>(patterns.Distinct());
     IsLocalHost      = tsm.IsLocalHost();
 }
Пример #2
0
        public static bool IsRoutingAllowed(this TSM tsm, RoutingOptions routingOptions)
        {
            switch (routingOptions)
            {
            case RoutingOptions.All:
                return(true);

            case RoutingOptions.Local:
                return(tsm.IsLocalHost());

            case RoutingOptions.Remote:
                return(!tsm.IsLocalHost());

            default:
                throw new ArgumentOutOfRangeException(nameof(routingOptions));
            }
        }