/// <summary> /// </summary> /// <exception cref="ArgumentNullException"> /// <paramref name="codeTaskNodeToInitialize"/> is <see langword="null"/>. /// </exception> protected virtual void InitializeCodeTask(NuGenCodeTaskTreeNode codeTaskNodeToInitialize) { if (codeTaskNodeToInitialize == null) { throw new ArgumentNullException("codeTaskNodeToInitialize"); } Debug.Assert(this.ImageListService != null, "this.ImageListService != null"); Debug.Assert(this.ImageList != null, "this.ImageList != null"); codeTaskNodeToInitialize.DefaultImageIndex = this.ImageListService.GetImageIndex(this.ImageList, PRIORITY_WANTED); }
/* * AddCodeTask */ /// <summary> /// </summary> /// <exception cref="ArgumentNullException"> /// <paramref name="taskItemToAdd"/> is <see langword="null"/>. /// </exception> public void AddCodeTask(TaskItem taskItemToAdd) { if (taskItemToAdd == null) { throw new ArgumentNullException("taskItemToAdd"); } NuGenCodeTaskTreeNode codeTaskNode = new NuGenCodeTaskTreeNode( this.ServiceProvider ); this.InitializeCodeTask(codeTaskNode); Debug.Assert(this.CodeTasks != null, "this.CodeTasks != null"); this.CodeTasks.Add(codeTaskNode, taskItemToAdd); Debug.Assert(this.CommentsFolder != null, "this.CommentsFolder != null"); this.CommentsFolder.Nodes.AddNode(codeTaskNode); codeTaskNode.Text = taskItemToAdd.Description; }