Esempio n. 1
0
        public ActionResult PublicTestGetSimpleMethodWithActionThrowsException()
        {
            using var pm = PerformanceMeter <PerformanceMeterController> .StartWatching();

            // execute an action that throws the exception to be handled by the exception handler
            pm.Executing()
            .WithExceptionHandler((ex) => Debug.WriteLine(ex.Message))
            .Start(() => throw new Exception(PerformanceMeter <PerformanceMeterController> .Print()));

            return(Ok());
        }