コード例 #1
0
        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();
        }
コード例 #2
0
 private void OnRefreshContext()
 {
     BlogPostEditorContext.RefreshContextAsync();
     AuthorEditorContext.RefreshContextAsync();
 }