protected async Task <AuthenticationResult> ExecuteMatsAsync( AcquireTokenCommonParameters commonParameters, Func <Task <AuthenticationResult> > executorAction) { var action = _mats.StartAction(_mats.CreateScenario(), commonParameters.CorrelationId.AsMatsCorrelationId()); try { var result = await executorAction().ConfigureAwait(false); _mats.EndAction(action, result); return(result); } catch (Exception ex) { _mats.EndAction(action, ex); throw; } }