Exemplo n.º 1
0
        public static void Main(string[] args)  // Pass in <IP address> and <port> for RabbitMQ
        {
            var rapidsConnection = new RabbitMqRapids("monitor_all_csharp", args[0], args[1]);
            var river            = new River(rapidsConnection);

            river.Register(new Monitor());
        }
        static void Main(string[] args)
        {
            string host = args[0];
            string port = args[1];

            var rapidsConnection = new RabbitMqRapids("monitor_in_csharp", host, port);
            var river            = new River(rapidsConnection);

            river.Require("solution", "id");
            river.Register(new SolutionSelection());
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            string host = args[0];
            string port = args[1];

            var rapidsConnection = new RabbitMqRapids("monitor_in_csharp", host, port);
            var river            = new River(rapidsConnection);

            river.RequireValue("need", "car_rental_offer");
            river.Forbid("solution");
            river.Register(new SolutionProvider());
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            string host = args[0];
            string port = args[1];

            var rapidsConnection = new RabbitMqRapids("monitor_in_csharp", host, port);
            var river            = new River(rapidsConnection);

            // See RiverTest for various functions River supports to aid in filtering, like:
            //river.Require("key1", "key2");       // Reject packet unless it has key1 and key2
            //river.Forbid("key1", "key2");        // Reject packet if it does have key1 or key2
            river.Register(new Monitor());         // Hook up to the river to start receiving traffic
        }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            string host = "192.168.254.120";
            string port = "5676";

            rapidsConnection = new RabbitMqRapids("monitor_in_csharp", host, port);
            var river = new River(rapidsConnection);

            // See RiverTest for various functions River supports to aid in filtering, like:
            //river.RequireValue("key", "expected_value");  // Reject packet unless key exists and has expected value
            //river.Require("key1", "key2");       // Reject packet unless it has key1 and key2
            //river.Forbid("key1", "key2");        // Reject packet if it does have key1 or key2
            river.Register(new MemberShipMonitor());         // Hook up to the river to start receiving traffic
        }