Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Task"/> class.
 /// </summary>
 /// <param name="TaskId">The task id.</param>
 public Task(int TaskId)
 {
     TaskEntity = ApplicationContext.Current.Services.TaskService.GetTaskById(TaskId);
     if (TaskEntity == null)
     {
         throw new NullReferenceException("No task found with id " + TaskId);
     }
 }
Exemple #2
0
 internal Task(Umbraco.Core.Models.Task task)
 {
     TaskEntity = task;
 }