예제 #1
0
        private static void RunTest(Action <int> test, int rowCount)
        {
            var watch = new Stopwatch();

            watch.Start();

            test(rowCount);

            watch.Stop();
            Console.WriteLine("Test run for {0:N0} rows took {1:N0}ms", rowCount, watch.ElapsedMilliseconds);

            Console.WriteLine("Performance stats: ");
            ProcessInfoDumper.Dump();
        }
예제 #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
//            Xceed.Wpf.DataGrid.Licenser.LicenseKey = "DGP45-L7AAA-RUWWA-5BBA";
            log4net.Config.XmlConfigurator.Configure();
            Exit += (sender, args) => _log.Debug(ProcessInfoDumper.GetProcessInfo());

            _kernel = new StandardKernel();
            _kernel.Bind <IAccountBalanceDataService>()
            .To <AccountBalanceDataService>()
            .WithConstructorArgument("dispatcher", Dispatcher)
            .WithConstructorArgument("maxEntries", 1024);

            _kernel.Bind <MainViewModel>().ToSelf();
            _kernel.Bind <IFxDataService>().To <FxDataService>();
            _kernel.Bind <IBrokerFeedDataService>().To <BrokerFeedDataService>();
            _kernel.Bind <GroupTestViewModel>().ToSelf();
            _kernel.Bind <GroupTestViewModelSyncfusion>().ToSelf();

            var locator = (ViewModelLocator)Resources["ViewModelLocator"];

            locator.Kernel = _kernel;
        }