Esempio n. 1
0
        protected void Application_Start()
        {
            var cs = ConnectionSettings.Create();

            var endpoint = new IPEndPoint(IPAddress.Loopback, 1113);
            var con      = EventStoreConnection.Create(endpoint);

            con.ConnectAsync();

            var credentials = new EventStore.ClientAPI.SystemData.UserCredentials("admin", "changeit");

            var adapter = new EventStoreAdapter(endpoint, credentials);

            ProjectionManager = new ProjectionManager(endpoint, credentials, adapter);
            ProjectionManager.Run();

            CommandManager = new CommandManager(con);

            //var binder = new DefaultModelBinder();
            //ModelBinders.Binders.Add(typeof(DateTime), binder);
            //ModelBinders.Binders.Add(typeof(DateTime?), binder);

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            userCredentials = new UserCredentials("admin", "changeit");

            address = new IPEndPoint(IPAddress.Loopback, 1113);
            var con = EventStoreConnection.Create(address);

            con.Connect();

            _adapter = new EventStoreAdapter(address, userCredentials);
            //CreateLines(1000000, con, "Users-5e3191f5_bb94_4074_b46b_9d4f8e4461b2");
            MeasureLines(con, userCredentials);
            // FromAll(con, userCredentials);
            //FromStream(con, userCredentials);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var endpoint = new IPEndPoint(IPAddress.Loopback, 1113);
            var esCon    = EventStoreConnection.Create(endpoint);

            esCon.Connect();

            var credentials = new UserCredentials("admin", "changeit");

            var adapter = new EventStoreAdapter(endpoint, credentials);

            //var cm = new CommandManager(esCon);
            //var pm = new ProjectionManager(endpoint, credentials, adapter);
            //pm.Run();


            //var cp = new MyDiagProjection(endpoint, credentials, adapter, "Budgets-1722f4ea_a9a5_4d97_8c39_c9d450a1331a");
            //cp.Start();
            //while (cp.HasLoaded == false)
            //    System.Threading.Thread.Sleep(100);

            //Console.WriteLine("done from all");
            //Console.ReadLine();

            var cp2 = new BudgetLinesProjection("Budgets-1722f4ea_a9a5_4d97_8c39_c9d450a1331a", endpoint, credentials, adapter, "lines_of_Budgets-1722f4ea_a9a5_4d97_8c39_c9d450a1331a");

            cp2.Start();

            //var cp2 = new MyDiagProjection(endpoint, credentials, adapter, "Budgets-1722f4ea_a9a5_4d97_8c39_c9d450a1331a", "lines_of_Budgets-1722f4ea_a9a5_4d97_8c39_c9d450a1331a");
            //cp2.Start();
            while (cp2.HasLoaded == false)
            {
                System.Threading.Thread.Sleep(100);
            }

            Console.ReadLine();
            //var events = adapter.GetStreamEvents("");
        }