// TODO-DESIGN: Refactor the constructor parameters once when we see which need the upcoming builders have. // Only the leaf nodes will have the analysis result set. protected BaseTreeViewItem(BaseTreeViewItem parent, IAnalysisResultTreeViewBuilder treeViewBuilder, int numberOfItems, /* See [1]. */ string text) { this.treeViewBuilder = treeViewBuilder; this.text = text; Parent = parent; NumberOfItems = numberOfItems == 0 ? null : numberOfItems == 1 ? $"({numberOfItems} item)" : $"({numberOfItems} items)"; children = numberOfItems == 0 ? Enumerable.Empty <BaseTreeViewItem>() : UnloadedChildrenMarker; }
public FilePathTreeViewItem(BaseTreeViewItem parent, IAnalysisResultTreeViewBuilder treeViewBuilder, int numberOfItems, SingleSyntaxTreeAnalysisContext analysisContext, string filePath) : base(parent, treeViewBuilder, numberOfItems, null) { this.analysisContext = analysisContext; FilePath = filePath; }
public CSharpFeatureTreeViewItem(BaseTreeViewItem parent, IAnalysisResultTreeViewBuilder treeViewBuilder, int numberOfItems, ICSharpFeature feature) : base(parent, treeViewBuilder, numberOfItems, feature.FriendlyName) { Feature = feature; }
public CSharpVersionTreeViewItem(BaseTreeViewItem parent, IAnalysisResultTreeViewBuilder treeViewBuilder, int numberOfItems, string cSharpVersion) : base(parent, treeViewBuilder, numberOfItems, "C# " + cSharpVersion, CSharpLanguageVersions.GetWhatIsNewUrlFor(cSharpVersion), GetLearnMoreDisplayTextFor(cSharpVersion)) // TODO: Replace the string creation once the abstraction for the C# version is fully implemented. { CSharpVersion = cSharpVersion; }
public SuggestionTreeViewItem(BaseTreeViewItem parent, IAnalysisResultTreeViewBuilder treeViewBuilder, int numberOfItems, ISharpenSuggestion suggestion) : base(parent, treeViewBuilder, numberOfItems, suggestion.FriendlyName, null) { Suggestion = suggestion; }
public CSharpVersionTreeViewItem(BaseTreeViewItem parent, IAnalysisResultTreeViewBuilder treeViewBuilder, int numberOfItems, string csharpVersion) : base(parent, treeViewBuilder, numberOfItems, "C# " + csharpVersion) // TODO: Replace the string creation once the abstraction for the C# version is fully implemented. { CSharpVersion = csharpVersion; }
public SingleSuggestionTreeViewItem(BaseTreeViewItem parent, IAnalysisResultTreeViewBuilder treeViewBuilder, AnalysisResult analysisResult) : base(parent, treeViewBuilder, 0, null) { AnalysisResult = analysisResult; }