Exemplo n.º 1
0
        public App()
        {
            var log = new Label();

            MainPage = new ContentPage
            {
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Start,
                    Children        =
                    {
                        new Button {
                            Text    = "Start benchmark",
                            Command = new Command(OnStartBenchmarkClick)
                        },
                        log
                    }
                }
            };

            BenchmarkManager manager = BenchmarkManager.Current;

            manager.Log += text => log.Text += Environment.NewLine + text;
            manager.Register(typeof(BenchmarksBasic).GetTypeInfo().Assembly);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            BenchmarkManager manager = BenchmarkManager.Current;

            manager.Log += WriteLine;
            manager.Register(typeof(BenchmarksBasic).Assembly);
            manager.Start();

            ReadLine();
        }