Ejemplo n.º 1
0
        public static void Main()
        {
            Console.WriteLine("DotNetBay Commandline");

            AuctionRunner auctionRunner = null;

            try
            {
                var store = new FileSystemMainRepository("store.json");
                var auctionService = new AuctionService(store, new SimpleMemberService(store));

                auctionRunner = new AuctionRunner(store);

                Console.WriteLine("Started AuctionRunner");
                auctionRunner.Start();

                var allAuctions = auctionService.GetAll();

                Console.WriteLine("Found {0} auctions returned by the service.", allAuctions.Count());

                Console.Write("Press enter to quit");
                Console.ReadLine();
            }
            finally
            {
                if (auctionRunner != null)
                {
                    auctionRunner.Dispose();
                }
            }

            Environment.Exit(0);
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            var ensureDLLIsCopied = System.Data.Entity.SqlServer.SqlProviderServices.Instance;

            Console.WriteLine("DotNetBay Commandline");

            var store = new FileSystemMainRepository("store.json");

            var auctionService = new AuctionService(store, new SimpleMemberService(store));
            var auctionRunner = new AuctionRunner(store);

            Console.WriteLine("Started AuctionRunner");
            auctionRunner.Start();

            var allAuctions = auctionService.GetAll();

            Console.WriteLine("Found {0} auctions returned by the service.", allAuctions.Count());

            Console.Write("Press enter to quit");
            Console.ReadLine();

            Environment.Exit(0);
        }