Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dotnet/APIView/APIViewWeb/Helpers/CodeFileHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -738,12 +738,12 @@ private static void InsertCodePanelRowData(CodePanelData codePanelData, CodePane
commentsForRow.AssociatedRowPositionInGroup = rowData.RowPositionInGroup;
if (codePanelData.NodeMetaDataObj.ContainsKey(nodeIdHashed))
{
codePanelData.NodeMetaDataObj[nodeIdHashed].CommentThreadObj.Add(codePanelData.NodeMetaDataObj[nodeIdHashed].CodeLinesObj.Count() - 1, commentsForRow); //Map comment to the index of associated codeLine
codePanelData.NodeMetaDataObj[nodeIdHashed].CommentThreadObj.TryAdd(codePanelData.NodeMetaDataObj[nodeIdHashed].CodeLinesObj.Count() - 1, commentsForRow); //Map comment to the index of associated codeLine
}
else
{
codePanelData.NodeMetaDataObj.TryAdd(nodeIdHashed, new CodePanelNodeMetaData());
codePanelData.NodeMetaDataObj[nodeIdHashed].CommentThreadObj.Add(codePanelData.NodeMetaDataObj[nodeIdHashed].CodeLinesObj.Count() - 1, commentsForRow); //Map comment to the index of associated codeLine
codePanelData.NodeMetaDataObj[nodeIdHashed].CommentThreadObj.TryAdd(codePanelData.NodeMetaDataObj[nodeIdHashed].CodeLinesObj.Count() - 1, commentsForRow); //Map comment to the index of associated codeLine
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public class CodePanelNodeMetaData
public List<CodePanelRowData> CodeLinesObj { get; set; } = new List<CodePanelRowData>();
public List<CodePanelRowData> CodeLines => CodeLinesObj.Count > 0 ? CodeLinesObj : null;
[JsonIgnore]
public Dictionary<int, CodePanelRowData> CommentThreadObj { get; set; } = new Dictionary<int, CodePanelRowData>(); //Dictionary key map to the index of the code line within this node which the comment thread is mapped to
public Dictionary<int, CodePanelRowData> CommentThread => CommentThreadObj.Count > 0 ? CommentThreadObj : null;
public ConcurrentDictionary<int, CodePanelRowData> CommentThreadObj { get; set; } = new ConcurrentDictionary<int, CodePanelRowData>(); //Dictionary key map to the index of the code line within this node which the comment thread is mapped to
public ConcurrentDictionary<int, CodePanelRowData> CommentThread => CommentThreadObj.Count > 0 ? CommentThreadObj : null;
public NavigationTreeNode NavigationTreeNode { get; set; }
public string ParentNodeIdHashed { get; set; }
[JsonIgnore]
Expand Down