Пример #1
0
        public static void Main(string[] args)
        {
            // Create the Prism event aggregator.
            var prismEventAggregator = new EventAggregator();

            // If you get an access denied error when running the demo, try this command line:
            //     netsh http add urlacl url=http://+:8700/MyUri user=DOMAIN\user
            const string Url = "http://+:8700/";

            // Register shims before WebApp.Start(). This ensures that the library's internal
            // Hub is visible to the SignalR server.
            PubSubSignalRServer.RegisterShims(new[]
                                          {
                                              new PrismEventAggregatorShim(prismEventAggregator), 
                                          });

            using (WebApp.Start<OwinConfig>(Url))
            {
                // Fire up the test BLL that will use the event service to broadcast to client.
                var myBusinessLogic = new MyBusinessLogic(prismEventAggregator);

                Console.WriteLine("Server started. Press any key to stop...");
                Console.ReadKey();
            }
        }
Пример #2
0
        public static void Main(string[] args)
        {
            // Create the Prism event aggregator.
            var prismEventAggregator = new EventAggregator();

            // If you get an access denied error when running the demo, try this command line:
            //     netsh http add urlacl url=http://+:8700/MyUri user=DOMAIN\user
            const string Url = "http://+:8700/";

            // Register shims before WebApp.Start(). This ensures that the library's internal
            // Hub is visible to the SignalR server.
            PubSubSignalRServer.RegisterShims(new[]
            {
                new PrismEventAggregatorShim(prismEventAggregator),
            });

            using (WebApp.Start <OwinConfig>(Url))
            {
                // Fire up the test BLL that will use the event service to broadcast to client.
                var myBusinessLogic = new MyBusinessLogic(prismEventAggregator);

                Console.WriteLine("Server started. Press any key to stop...");
                Console.ReadKey();
            }
        }