本文整理汇总了C#中Story.AddComment方法的典型用法代码示例。如果您正苦于以下问题:C# Story.AddComment方法的具体用法?C# Story.AddComment怎么用?C# Story.AddComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Story
的用法示例。
在下文中一共展示了Story.AddComment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateData
/// <summary>
/// Creates the data.
/// </summary>
public void CreateData()
{
#region Projecten
Project project_JelloScrum = new Project();
project_JelloScrum.Name = "Jello Scrum";
project_JelloScrum.Description = "Scrum project managment tool";
ProjectRepository.Save(project_JelloScrum);
Project project_James = new Project();
project_James.Name = "James";
project_James.Description = "Inklok systeem voor Auxilium BV";
ProjectRepository.Save(project_James);
#endregion
#region Gebruikers
User user1 = new User();
user1.Name = "user1";
user1.ChangeUserName("ProductOwner");
user1.FullName = "Gebruiker 1";
GebruikerRepository.Save(user1);
User user2 = new User();
user2.Name = "user2";
user2.ChangeUserName("ScrumMaster");
user2.SystemRole = SystemRole.Administrator;
user2.FullName = "Gebruiker 2";
GebruikerRepository.Save(user2);
User user3 = new User();
user3.Name = "user3";
user3.ChangeUserName("Developer");
user3.SystemRole = SystemRole.User;
user3.FullName = "Gebruiker 3";
GebruikerRepository.Save(user3);
#endregion
#region Stories
#region JelloScrum stories
for (int i = 0; i < 20; i++)
{
Story story = new Story(project_JelloScrum, user1, null, StoryType.UserStory);
story.HowtoDemo = "uitleg voor de demo " + i.ToString();
story.Note = "notitie " + i.ToString();
story.Description = "omschrijving " + i.ToString();
story.ProductBacklogPriority = (Priority)RandomNumber(0, 3);
story.Estimation = new TimeSpan(4, 30, 0);
story.Title = "JelloScrum story number: " + i.ToString();
ProjectRepository.Save(project_JelloScrum);
}
#endregion
#region James stories
for (int i = 0; i < 20; i++)
{
Story story = new Story(project_James, user1, null, StoryType.UserStory);
story.HowtoDemo = "uitleg voor de demo " + i.ToString();
story.Note = "notitie " + i.ToString();
story.Description = "omschrijving " + i.ToString();
story.ProductBacklogPriority = (Priority)RandomNumber(0, 3);
story.Estimation = new TimeSpan(6, 0, 0);
story.Title = "James story number: " + i.ToString();
ProjectRepository.Save(project_James);
}
#endregion
#endregion
#region Tasks
#region JelloScrum
foreach (Story story in project_JelloScrum.Stories)
{
for (int i = RandomNumber(0, 4); i < 6; i++)
{
Task task = new Task();
task.Description = "Omschrijving voor JelloScrum story " + story.Title + " taak nummer " + i.ToString();
task.Story = story;
story.AddTask(task);
TaskComment bericht = new TaskComment(task, "blabla comment teskt " + i.ToString());
task.AddComment(bericht);
StoryRepository.SaveOrUpdate(story);
}
story.AddComment("Storycomment James teskt");
StoryRepository.Save(story);
}
#endregion
#region James
foreach (Story story in project_James.Stories)
{
for (int i = RandomNumber(0, 4); i < 5; i++)
{
Task task = new Task();
task.Description = "Omschrijving voor James story " + story.Title + " taak nummer " + i.ToString();
task.Story = story;
story.AddTask(task);
//.........这里部分代码省略.........