public ApplicationContext(DefaultBlogPostRepository repository)
        {
            if (repository == null)
            {
                throw new ArgumentNullException(nameof(repository));
            }

            BlogPostEditorContext = new BlogPostEditorContext(repository);
            AuthorEditorContext   = new AuthorEditorContext(repository);

            BlogPostEditorContext.RefreshContext += (sender, args) => OnRefreshContext();
            AuthorEditorContext.RefreshContext   += (sender, args) => OnRefreshContext();

            RefreshCommand = new ActionCommand(OnRefreshContext);

            OnRefreshContext();
        }
 private void OnRefreshContext()
 {
     BlogPostEditorContext.RefreshContextAsync();
     AuthorEditorContext.RefreshContextAsync();
 }