Exemple #1
0
 /*==========================================================================================================================
 | CONSTRUCTOR
 \-------------------------------------------------------------------------------------------------------------------------*/
 /// <summary>
 ///   Constructs a new instances of a <see cref="TopicViewResult"/> based on the <see cref="ITopicViewModelCore.View"/> and
 ///   <see cref="ITopicViewModelCore.ContentType"/>.
 /// </summary>
 /// <remarks>
 ///   If the <see cref="ITopicViewModelCore.ContentType"/> is unavailable, it is assumed to be <c>Page</c>. If the <see
 ///   cref="ITopicViewModelCore.View"/> is unavailable, it is assumed to be the same as the <see
 ///   cref="ITopicViewModelCore.ContentType"/>.
 /// </remarks>
 public TopicViewResult(ITopicViewModel viewModel) : base() {
   Contract.Requires(viewModel, nameof(viewModel));
   ViewData.Model = viewModel;
   _contentType = viewModel.ContentType ?? "Page";
   _topicView = viewModel.View ?? _contentType;
 }
 public SaveTopicCommand(ITopicViewModel topic)
 {
     Topic = topic;
 }
Exemple #3
0
 public DeleteTopicCommand(ITopicViewModel topic)
 {
     Topic = topic;
 }