public BinaryMessageRoute(Action<SocketSubscription, BinaryMessage> handler, BinaryMessageRoutePredicate predicate = null)
        {
            Ensure.That(handler, "handler").IsNotNull();

            Handler = handler;
            Predicate = predicate ?? (subscription => true);
        }
Beispiel #2
0
        public virtual Routes RegisterBinary(Action<SocketSubscription, BinaryMessage> handler, BinaryMessageRoutePredicate predicate = null)
        {
            BinaryMessageRoutes.Add(new BinaryMessageRoute(handler, predicate));

            return this;
        }