public static Task <bool> CloseAsync([NotNull] this IViewModel viewModel, [CanBeNull] object parameter) { IDataContext context = null; if (parameter != null) { context = new DataContext(); context.Add(NavigationConstants.CloseParameter, parameter); } return(viewModel.CloseAsync(context)); }