Пример #1
0
        static void Main()
        {
            var publications = new PublicationGenerator().Generate(new PublicationConfiguration(), 100);

            WriteInFile(JsonConvert.SerializeObject(publications), true);

            var subcriptions = new SubscriptionGenerator().Generate(new SubscriptionConfiguration(), 100);

            WriteInFile(JsonConvert.SerializeObject(subcriptions));
        }
Пример #2
0
        static void Main()
        {
            var publications = new PublicationGenerator().Generate(new PublicationConfiguration(), 10);

            WriteInFile(JsonConvert.SerializeObject(publications), true);

            var subscriptions = new SubscriptionGenerator().Generate(new SubscriptionConfiguration(), 10);

            WriteInFile(JsonConvert.SerializeObject(subscriptions));

            Broker b = new Broker();

            foreach (Publication p in publications)
            {
                b.Match(p, subscriptions);
            }
        }