/// <summary>
 /// Sets the document.
 /// </summary>
 /// <param name="document">The document.</param>
 private void SetDocument(XMLDocuments.V1.Document document)
 {
     _document.Issues = document.Issues.Select(i => new Issue
                                                        {
                                                            Id = i.Id,
                                                            Priority = i.Priority,
                                                            Summary = i.Summary,
                                                            Description = i.Description,
                                                            Type = i.Type,
                                                            Status = i.Status,
                                                            Deadline = i.Deadline,
                                                            Links = i.Links != null ? i.Links.ToList() : new List<string>(),
                                                            CreationDate = i.CreationDate,
                                                            IsCustomRoot = i.IsCustomRoot
                                                        }).ToDictionary(i => i.Id);
     _document.IssuesLinks = document.IssuesLinks.Select(pi => new IssueLink
                                                                   {
                                                                       ChildId = pi.ParentId,
                                                                       ParentId = pi.ChildId,
                                                                       Order = pi.Order
                                                                   }).ToList();
 }
示例#2
0
 /// <summary>
 /// Sets the document.
 /// </summary>
 /// <param name="document">The document.</param>
 private void SetDocument(XMLDocuments.V1.Document document)
 {
     _document.Issues = document.Issues.Select(i => new Issue
                                                        {
                                                            Id = i.Id,
                                                            Priority = i.Priority,
                                                            Summary = i.Summary,
                                                            Description = i.Description,
                                                            Type = i.Type,
                                                            Status = i.Status,
                                                            Deadline = i.Deadline,
                                                            Links = i.Links!=null ? i.Links.ToList():new List<string>(),
                                                            CreationDate = i.CreationDate,
                                                            IsCustomRoot = i.IsCustomRoot
                                                        }).ToDictionary(i => i.Id);
     foreach (var issue in document.Issues)
     {
         if(!String.IsNullOrEmpty(issue.WebSite))
         {
             _document.Issues[issue.Id].Links.Add(issue.WebSite);
         }
     }
     _document.IssuesLinks = document.IssuesLinks.Select(pi => new IssueLink
                                                                   {
                                                                       ChildId = pi.ParentId,
                                                                       ParentId = pi.ChildId
                                                                   }).ToList();
 }