private static void OnViewModelClosed(object sender, EventArgs e) { var viewModel = (IViewModel)sender; AuditingManager.OnViewModelClosed(viewModel); UnsubscribeEvents(viewModel); }
private static Task OnViewModelClosedAsync(object sender, EventArgs e) { if (!AuditingManager.IsAuditingEnabled) { return(TaskHelper.Completed); } var viewModel = (IViewModel)sender; AuditingManager.OnViewModelClosed(viewModel); UnsubscribeEvents(viewModel); return(TaskHelper.Completed); }