public static PostListingViewModel LoadViewModel(PostStore postStore, MessageStore messageStore)
        {
            PostListingViewModel viewModel = new PostListingViewModel(postStore, messageStore);

            viewModel.LoadPostsCommand.Execute(null);

            return(viewModel);
        }
示例#2
0
        public static PostListingViewModel LoadViewModel(PostStore postStore, Action <Task> onLoaded = null)
        {
            PostListingViewModel viewModel = new PostListingViewModel(postStore);

            viewModel.LoadPosts().ContinueWith(t => onLoaded?.Invoke(t));

            return(viewModel);
        }